From 037a6eda7e592c730b73bdc53c7582c1463bd065 Mon Sep 17 00:00:00 2001 From: yuli-ferna Date: Wed, 8 Jan 2025 16:41:52 -0400 Subject: [PATCH] use v1 and rm aptos old lib --- apps/connect/package-lock.json | 665 +++++++++++++++++------ apps/connect/package.json | 2 +- apps/connect/src/env/common.ts | 2 +- apps/connect/src/utils/isValidAddress.ts | 7 +- 4 files changed, 519 insertions(+), 157 deletions(-) diff --git a/apps/connect/package-lock.json b/apps/connect/package-lock.json index bba1a84ed..12358fed6 100644 --- a/apps/connect/package-lock.json +++ b/apps/connect/package-lock.json @@ -8,6 +8,7 @@ "name": "@xlabs/portal-bridge-ui", "version": "0.2.19", "dependencies": { + "@aptos-labs/ts-sdk": "^1.33.1", "@certusone/wormhole-sdk": "^0.10.18", "@emotion/react": "^11.11.1", "@emotion/styled": "^11.11.0", @@ -16,7 +17,6 @@ "@tanstack/react-query": "^5.14.2", "@wormhole-foundation/sdk": "^1.0.0", "@wormhole-foundation/wormhole-connect": "^1.1.10-beta.2-development", - "aptos": "^1.21.0", "bech32": "^2.0.0", "dompurify": "^3.0.6", "mixpanel-browser": "^2.53.0", @@ -166,7 +166,7 @@ "@aptos-labs/wallet-standard": "^0.2.0" } }, - "node_modules/@aptos-connect/wallet-api": { + "node_modules/@aptos-connect/wallet-adapter-plugin/node_modules/@aptos-connect/wallet-api": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/@aptos-connect/wallet-api/-/wallet-api-0.1.6.tgz", "integrity": "sha512-S/D95pfDKSEEI8SsYy7sSzrjJ1DDnlVx7JVT9kpW11IjgCpHMHFs62EhZVhxztwcS+CYMyKdQpDyRO+IDtPVFw==", @@ -179,33 +179,55 @@ "aptos": "^1.20.0" } }, - "node_modules/@aptos-connect/web-transport": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@aptos-connect/web-transport/-/web-transport-0.1.1.tgz", - "integrity": "sha512-QIh4enF0YCYkSBbaoC4k5bQP6z+mcRsNS24oDm4fnCN03bgfrRXr1wAlX4TPoGHnAuIOHgmZqh/xVoaK48bTDg==", + "node_modules/@aptos-connect/wallet-adapter-plugin/node_modules/@noble/hashes": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", + "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==", + "peer": true, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@aptos-connect/wallet-adapter-plugin/node_modules/@scure/bip39": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.1.tgz", + "integrity": "sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg==", + "peer": true, "dependencies": { - "@aptos-connect/wallet-api": "^0.1.6", - "uuid": "^9.0.1" + "@noble/hashes": "~1.3.0", + "@scure/base": "~1.1.0" }, - "peerDependencies": { - "@aptos-labs/ts-sdk": "^1.33.1", - "@aptos-labs/wallet-standard": "^0.2.0", - "@telegram-apps/bridge": "^1.0.0", - "aptos": "^1.20.0" + "funding": { + "url": "https://paulmillr.com/funding/" } }, - "node_modules/@aptos-connect/web-transport/node_modules/uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "bin": { - "uuid": "dist/bin/uuid" + "node_modules/@aptos-connect/wallet-adapter-plugin/node_modules/aptos": { + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/aptos/-/aptos-1.21.0.tgz", + "integrity": "sha512-PRKjoFgL8tVEc9+oS7eJUv8GNxx8n3+0byH2+m7CP3raYOD6yFKOecuwjVMIJmgfpjp6xH0P0HDMGZAXmSyU0Q==", + "deprecated": "Package aptos is no longer supported, please migrate to https://www.npmjs.com/package/@aptos-labs/ts-sdk", + "peer": true, + "dependencies": { + "@aptos-labs/aptos-client": "^0.1.0", + "@noble/hashes": "1.3.3", + "@scure/bip39": "1.2.1", + "eventemitter3": "^5.0.1", + "form-data": "4.0.0", + "tweetnacl": "1.0.3" + }, + "engines": { + "node": ">=11.0.0" } }, + "node_modules/@aptos-connect/wallet-adapter-plugin/node_modules/eventemitter3": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", + "peer": true + }, "node_modules/@aptos-labs/aptos-cli": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/@aptos-labs/aptos-cli/-/aptos-cli-1.0.2.tgz", @@ -273,20 +295,6 @@ "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==" }, - "node_modules/@aptos-labs/wallet-adapter-core": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@aptos-labs/wallet-adapter-core/-/wallet-adapter-core-3.5.0.tgz", - "integrity": "sha512-aA2kND9ikLOVx8yMS804S/atLZqmPe+Ldw/v9yG5osTHm+samv9H1NBha0rRGvArndeBcN4dGl9C/nc/SXyNcQ==", - "dependencies": { - "buffer": "^6.0.3", - "eventemitter3": "^4.0.7", - "tweetnacl": "^1.0.3" - }, - "peerDependencies": { - "@aptos-labs/ts-sdk": "^1.3.0", - "aptos": "^1.21.0" - } - }, "node_modules/@aptos-labs/wallet-standard": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/@aptos-labs/wallet-standard/-/wallet-standard-0.2.0.tgz", @@ -3011,15 +3019,6 @@ "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==" }, - "node_modules/@bitget-wallet/aptos-wallet-adapter": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@bitget-wallet/aptos-wallet-adapter/-/aptos-wallet-adapter-0.1.2.tgz", - "integrity": "sha512-6dImtKlwdk0zuYKQpeZ/nOVyyBXqTxVin9ZLgdyPXsnBcpy0PnyGgffsfsOVHxk93eOdiRjNxoiCs1b4a+1ssg==", - "peerDependencies": { - "@aptos-labs/wallet-adapter-core": "3.5.0", - "aptos": "^1.21.0" - } - }, "node_modules/@certusone/wormhole-sdk": { "version": "0.10.18", "resolved": "https://registry.npmjs.org/@certusone/wormhole-sdk/-/wormhole-sdk-0.10.18.tgz", @@ -3077,56 +3076,6 @@ "undici-types": "~5.26.4" } }, - "node_modules/@certusone/wormhole-sdk/node_modules/@noble/hashes": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.1.3.tgz", - "integrity": "sha512-CE0FCR57H2acVI5UOzIGSSIYxZ6v/HOhDR0Ro9VLyhnzLwx0o8W1mmgaqlEUx4049qJDlIBRztv5k+MM8vbO3A==", - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ] - }, - "node_modules/@certusone/wormhole-sdk/node_modules/@scure/bip39": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.1.0.tgz", - "integrity": "sha512-pwrPOS16VeTKg98dYXQyIjJEcWfz7/1YJIwxUEPFfQPtc86Ym/1sVgQ2RLoD43AazMk2l/unK4ITySSpW2+82w==", - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "dependencies": { - "@noble/hashes": "~1.1.1", - "@scure/base": "~1.1.0" - } - }, - "node_modules/@certusone/wormhole-sdk/node_modules/aptos": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/aptos/-/aptos-1.5.0.tgz", - "integrity": "sha512-N7OuRtU7IYHkDkNx+4QS3g/QQGCp+36KzYn3oXPmT7Kttfuv+UKliQVdjy3cLmwd/DCQSh9ObTovwdxnHjUn0g==", - "dependencies": { - "@noble/hashes": "1.1.3", - "@scure/bip39": "1.1.0", - "axios": "0.27.2", - "form-data": "4.0.0", - "tweetnacl": "1.0.3" - }, - "engines": { - "node": ">=11.0.0" - } - }, - "node_modules/@certusone/wormhole-sdk/node_modules/aptos/node_modules/axios": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", - "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", - "dependencies": { - "follow-redirects": "^1.14.9", - "form-data": "^4.0.0" - } - }, "node_modules/@classic-terra/terra.proto": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@classic-terra/terra.proto/-/terra.proto-1.1.0.tgz", @@ -6901,16 +6850,61 @@ "node": ">=16" } }, + "node_modules/@fewcha/web3/node_modules/@noble/hashes": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", + "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@fewcha/web3/node_modules/@scure/bip39": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.1.tgz", + "integrity": "sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg==", + "dependencies": { + "@noble/hashes": "~1.3.0", + "@scure/base": "~1.1.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@fewcha/web3/node_modules/@types/node": { "version": "12.20.55", "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==" }, + "node_modules/@fewcha/web3/node_modules/aptos": { + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/aptos/-/aptos-1.21.0.tgz", + "integrity": "sha512-PRKjoFgL8tVEc9+oS7eJUv8GNxx8n3+0byH2+m7CP3raYOD6yFKOecuwjVMIJmgfpjp6xH0P0HDMGZAXmSyU0Q==", + "deprecated": "Package aptos is no longer supported, please migrate to https://www.npmjs.com/package/@aptos-labs/ts-sdk", + "dependencies": { + "@aptos-labs/aptos-client": "^0.1.0", + "@noble/hashes": "1.3.3", + "@scure/bip39": "1.2.1", + "eventemitter3": "^5.0.1", + "form-data": "4.0.0", + "tweetnacl": "1.0.3" + }, + "engines": { + "node": ">=11.0.0" + } + }, "node_modules/@fewcha/web3/node_modules/commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" }, + "node_modules/@fewcha/web3/node_modules/eventemitter3": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==" + }, "node_modules/@fewcha/web3/node_modules/jayson": { "version": "3.7.0", "resolved": "https://registry.npmjs.org/jayson/-/jayson-3.7.0.tgz", @@ -7124,6 +7118,67 @@ "@aptos-labs/ts-sdk": "^1.33.1" } }, + "node_modules/@identity-connect/crypto/node_modules/@aptos-connect/wallet-api": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/@aptos-connect/wallet-api/-/wallet-api-0.1.6.tgz", + "integrity": "sha512-S/D95pfDKSEEI8SsYy7sSzrjJ1DDnlVx7JVT9kpW11IjgCpHMHFs62EhZVhxztwcS+CYMyKdQpDyRO+IDtPVFw==", + "dependencies": { + "@identity-connect/api": "^0.7.0" + }, + "peerDependencies": { + "@aptos-labs/ts-sdk": "^1.33.1", + "@aptos-labs/wallet-standard": "^0.2.0", + "aptos": "^1.20.0" + } + }, + "node_modules/@identity-connect/crypto/node_modules/@noble/hashes": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", + "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@identity-connect/crypto/node_modules/@scure/bip39": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.1.tgz", + "integrity": "sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg==", + "peer": true, + "dependencies": { + "@noble/hashes": "~1.3.0", + "@scure/base": "~1.1.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@identity-connect/crypto/node_modules/aptos": { + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/aptos/-/aptos-1.21.0.tgz", + "integrity": "sha512-PRKjoFgL8tVEc9+oS7eJUv8GNxx8n3+0byH2+m7CP3raYOD6yFKOecuwjVMIJmgfpjp6xH0P0HDMGZAXmSyU0Q==", + "deprecated": "Package aptos is no longer supported, please migrate to https://www.npmjs.com/package/@aptos-labs/ts-sdk", + "peer": true, + "dependencies": { + "@aptos-labs/aptos-client": "^0.1.0", + "@noble/hashes": "1.3.3", + "@scure/bip39": "1.2.1", + "eventemitter3": "^5.0.1", + "form-data": "4.0.0", + "tweetnacl": "1.0.3" + }, + "engines": { + "node": ">=11.0.0" + } + }, + "node_modules/@identity-connect/crypto/node_modules/eventemitter3": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", + "peer": true + }, "node_modules/@identity-connect/dapp-sdk": { "version": "0.10.2", "resolved": "https://registry.npmjs.org/@identity-connect/dapp-sdk/-/dapp-sdk-0.10.2.tgz", @@ -7142,6 +7197,86 @@ "@aptos-labs/wallet-standard": "^0.2.0" } }, + "node_modules/@identity-connect/dapp-sdk/node_modules/@aptos-connect/wallet-api": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/@aptos-connect/wallet-api/-/wallet-api-0.1.6.tgz", + "integrity": "sha512-S/D95pfDKSEEI8SsYy7sSzrjJ1DDnlVx7JVT9kpW11IjgCpHMHFs62EhZVhxztwcS+CYMyKdQpDyRO+IDtPVFw==", + "dependencies": { + "@identity-connect/api": "^0.7.0" + }, + "peerDependencies": { + "@aptos-labs/ts-sdk": "^1.33.1", + "@aptos-labs/wallet-standard": "^0.2.0", + "aptos": "^1.20.0" + } + }, + "node_modules/@identity-connect/dapp-sdk/node_modules/@aptos-connect/web-transport": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@aptos-connect/web-transport/-/web-transport-0.1.1.tgz", + "integrity": "sha512-QIh4enF0YCYkSBbaoC4k5bQP6z+mcRsNS24oDm4fnCN03bgfrRXr1wAlX4TPoGHnAuIOHgmZqh/xVoaK48bTDg==", + "dependencies": { + "@aptos-connect/wallet-api": "^0.1.6", + "uuid": "^9.0.1" + }, + "peerDependencies": { + "@aptos-labs/ts-sdk": "^1.33.1", + "@aptos-labs/wallet-standard": "^0.2.0", + "@telegram-apps/bridge": "^1.0.0", + "aptos": "^1.20.0" + } + }, + "node_modules/@identity-connect/dapp-sdk/node_modules/@identity-connect/wallet-api": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@identity-connect/wallet-api/-/wallet-api-0.1.2.tgz", + "integrity": "sha512-8wyC0rWYb4+L0/K9Kf+LV9U8k5ZUkbauyf4lVVdUatCw1trsBVXObACKzgEidfpfgx23S9w7hctLpegb/QkwSg==", + "peerDependencies": { + "@aptos-labs/ts-sdk": "^1.33.1", + "aptos": "^1.20.0" + } + }, + "node_modules/@identity-connect/dapp-sdk/node_modules/@noble/hashes": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", + "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==", + "peer": true, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@identity-connect/dapp-sdk/node_modules/@scure/bip39": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.1.tgz", + "integrity": "sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg==", + "peer": true, + "dependencies": { + "@noble/hashes": "~1.3.0", + "@scure/base": "~1.1.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@identity-connect/dapp-sdk/node_modules/aptos": { + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/aptos/-/aptos-1.21.0.tgz", + "integrity": "sha512-PRKjoFgL8tVEc9+oS7eJUv8GNxx8n3+0byH2+m7CP3raYOD6yFKOecuwjVMIJmgfpjp6xH0P0HDMGZAXmSyU0Q==", + "deprecated": "Package aptos is no longer supported, please migrate to https://www.npmjs.com/package/@aptos-labs/ts-sdk", + "peer": true, + "dependencies": { + "@aptos-labs/aptos-client": "^0.1.0", + "@noble/hashes": "1.3.3", + "@scure/bip39": "1.2.1", + "eventemitter3": "^5.0.1", + "form-data": "4.0.0", + "tweetnacl": "1.0.3" + }, + "engines": { + "node": ">=11.0.0" + } + }, "node_modules/@identity-connect/dapp-sdk/node_modules/axios": { "version": "1.7.9", "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.9.tgz", @@ -7152,6 +7287,12 @@ "proxy-from-env": "^1.1.0" } }, + "node_modules/@identity-connect/dapp-sdk/node_modules/eventemitter3": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", + "peer": true + }, "node_modules/@identity-connect/dapp-sdk/node_modules/uuid": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", @@ -7164,15 +7305,6 @@ "uuid": "dist/bin/uuid" } }, - "node_modules/@identity-connect/wallet-api": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@identity-connect/wallet-api/-/wallet-api-0.1.2.tgz", - "integrity": "sha512-8wyC0rWYb4+L0/K9Kf+LV9U8k5ZUkbauyf4lVVdUatCw1trsBVXObACKzgEidfpfgx23S9w7hctLpegb/QkwSg==", - "peerDependencies": { - "@aptos-labs/ts-sdk": "^1.33.1", - "aptos": "^1.20.0" - } - }, "node_modules/@improbable-eng/grpc-web": { "version": "0.15.0", "resolved": "https://registry.npmjs.org/@improbable-eng/grpc-web/-/grpc-web-0.15.0.tgz", @@ -10254,17 +10386,62 @@ "aptos": "^1.9.1" } }, - "node_modules/@pontem/wallet-adapter-plugin/node_modules/@aptos-labs/wallet-adapter-core": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@aptos-labs/wallet-adapter-core/-/wallet-adapter-core-2.2.0.tgz", - "integrity": "sha512-JL0zTXXoSQba1EDGqY5yTJxZVKMKwgMKZNA1JyV54s5loWzE2tinwg002EB+ONodkVmMhKbWnajCFFOgvgk+NQ==", + "node_modules/@pontem/wallet-adapter-plugin/node_modules/@aptos-labs/wallet-adapter-core": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@aptos-labs/wallet-adapter-core/-/wallet-adapter-core-2.2.0.tgz", + "integrity": "sha512-JL0zTXXoSQba1EDGqY5yTJxZVKMKwgMKZNA1JyV54s5loWzE2tinwg002EB+ONodkVmMhKbWnajCFFOgvgk+NQ==", + "dependencies": { + "aptos": "^1.3.17", + "buffer": "^6.0.3", + "eventemitter3": "^4.0.7", + "tweetnacl": "^1.0.3" + } + }, + "node_modules/@pontem/wallet-adapter-plugin/node_modules/@noble/hashes": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", + "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@pontem/wallet-adapter-plugin/node_modules/@scure/bip39": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.1.tgz", + "integrity": "sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg==", + "dependencies": { + "@noble/hashes": "~1.3.0", + "@scure/base": "~1.1.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@pontem/wallet-adapter-plugin/node_modules/aptos": { + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/aptos/-/aptos-1.21.0.tgz", + "integrity": "sha512-PRKjoFgL8tVEc9+oS7eJUv8GNxx8n3+0byH2+m7CP3raYOD6yFKOecuwjVMIJmgfpjp6xH0P0HDMGZAXmSyU0Q==", + "deprecated": "Package aptos is no longer supported, please migrate to https://www.npmjs.com/package/@aptos-labs/ts-sdk", "dependencies": { - "aptos": "^1.3.17", - "buffer": "^6.0.3", - "eventemitter3": "^4.0.7", - "tweetnacl": "^1.0.3" + "@aptos-labs/aptos-client": "^0.1.0", + "@noble/hashes": "1.3.3", + "@scure/bip39": "1.2.1", + "eventemitter3": "^5.0.1", + "form-data": "4.0.0", + "tweetnacl": "1.0.3" + }, + "engines": { + "node": ">=11.0.0" } }, + "node_modules/@pontem/wallet-adapter-plugin/node_modules/aptos/node_modules/eventemitter3": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==" + }, "node_modules/@popperjs/core": { "version": "2.11.8", "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", @@ -18735,6 +18912,18 @@ "url": "https://paulmillr.com/funding/" } }, + "node_modules/@wormhole-foundation/wormhole-connect/node_modules/@noble/hashes": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", + "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==", + "peer": true, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@wormhole-foundation/wormhole-connect/node_modules/@project-serum/anchor": { "version": "0.26.0", "resolved": "https://registry.npmjs.org/@project-serum/anchor/-/anchor-0.26.0.tgz", @@ -18760,6 +18949,19 @@ "node": ">=11" } }, + "node_modules/@wormhole-foundation/wormhole-connect/node_modules/@scure/bip39": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.1.tgz", + "integrity": "sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg==", + "peer": true, + "dependencies": { + "@noble/hashes": "~1.3.0", + "@scure/base": "~1.1.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@wormhole-foundation/wormhole-connect/node_modules/@types/node": { "version": "22.7.5", "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.5.tgz", @@ -18773,6 +18975,30 @@ "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-4.0.0-beta.5.tgz", "integrity": "sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q==" }, + "node_modules/@wormhole-foundation/wormhole-connect/node_modules/aptos": { + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/aptos/-/aptos-1.21.0.tgz", + "integrity": "sha512-PRKjoFgL8tVEc9+oS7eJUv8GNxx8n3+0byH2+m7CP3raYOD6yFKOecuwjVMIJmgfpjp6xH0P0HDMGZAXmSyU0Q==", + "deprecated": "Package aptos is no longer supported, please migrate to https://www.npmjs.com/package/@aptos-labs/ts-sdk", + "peer": true, + "dependencies": { + "@aptos-labs/aptos-client": "^0.1.0", + "@noble/hashes": "1.3.3", + "@scure/bip39": "1.2.1", + "eventemitter3": "^5.0.1", + "form-data": "4.0.0", + "tweetnacl": "1.0.3" + }, + "engines": { + "node": ">=11.0.0" + } + }, + "node_modules/@wormhole-foundation/wormhole-connect/node_modules/aptos/node_modules/eventemitter3": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", + "peer": true + }, "node_modules/@wormhole-foundation/wormhole-connect/node_modules/axios": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/axios/-/axios-1.4.0.tgz", @@ -18940,6 +19166,101 @@ "aptos": "^1.21.0" } }, + "node_modules/@xlabs-libs/wallet-aggregator-aptos/node_modules/@bitget-wallet/aptos-wallet-adapter": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@bitget-wallet/aptos-wallet-adapter/-/aptos-wallet-adapter-0.1.2.tgz", + "integrity": "sha512-6dImtKlwdk0zuYKQpeZ/nOVyyBXqTxVin9ZLgdyPXsnBcpy0PnyGgffsfsOVHxk93eOdiRjNxoiCs1b4a+1ssg==", + "peerDependencies": { + "@aptos-labs/wallet-adapter-core": "3.5.0", + "aptos": "^1.21.0" + } + }, + "node_modules/@xlabs-libs/wallet-aggregator-aptos/node_modules/@noble/hashes": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", + "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==", + "peer": true, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@xlabs-libs/wallet-aggregator-aptos/node_modules/@scure/bip39": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.1.tgz", + "integrity": "sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg==", + "peer": true, + "dependencies": { + "@noble/hashes": "~1.3.0", + "@scure/base": "~1.1.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@xlabs-libs/wallet-aggregator-aptos/node_modules/aptos": { + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/aptos/-/aptos-1.21.0.tgz", + "integrity": "sha512-PRKjoFgL8tVEc9+oS7eJUv8GNxx8n3+0byH2+m7CP3raYOD6yFKOecuwjVMIJmgfpjp6xH0P0HDMGZAXmSyU0Q==", + "deprecated": "Package aptos is no longer supported, please migrate to https://www.npmjs.com/package/@aptos-labs/ts-sdk", + "peer": true, + "dependencies": { + "@aptos-labs/aptos-client": "^0.1.0", + "@noble/hashes": "1.3.3", + "@scure/bip39": "1.2.1", + "eventemitter3": "^5.0.1", + "form-data": "4.0.0", + "tweetnacl": "1.0.3" + }, + "engines": { + "node": ">=11.0.0" + } + }, + "node_modules/@xlabs-libs/wallet-aggregator-aptos/node_modules/aptos/node_modules/eventemitter3": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", + "peer": true + }, + "node_modules/@xlabs-libs/wallet-aggregator-aptos/node_modules/petra-plugin-wallet-adapter": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/petra-plugin-wallet-adapter/-/petra-plugin-wallet-adapter-0.4.5.tgz", + "integrity": "sha512-x2S2xRAIz/5ytbB2wHCTJhqLBDsgWPEVmj7X2aril1BUplIGPJHTstgo8hqOngb2rtYbBY+wviyS9Di4IDCGRA==", + "dependencies": { + "@aptos-labs/wallet-adapter-core": "^3.5.0" + }, + "peerDependencies": { + "@aptos-labs/ts-sdk": "^1.3.0", + "aptos": "^1.21.0" + } + }, + "node_modules/@xlabs-libs/wallet-aggregator-aptos/node_modules/petra-plugin-wallet-adapter/node_modules/@aptos-labs/wallet-adapter-core": { + "version": "3.16.0", + "resolved": "https://registry.npmjs.org/@aptos-labs/wallet-adapter-core/-/wallet-adapter-core-3.16.0.tgz", + "integrity": "sha512-4pBNoDLzuIOxdNwJEO770bkxROuEIQis0H0lFOVVCL33jK8/MWLlQo8hFgc71ovN1vWfdERDEgPLbAtVChploQ==", + "dependencies": { + "@aptos-labs/wallet-standard": "^0.0.11", + "@atomrigslab/aptos-wallet-adapter": "^0.1.10", + "buffer": "^6.0.3", + "eventemitter3": "^4.0.7", + "tweetnacl": "^1.0.3" + }, + "peerDependencies": { + "@aptos-labs/ts-sdk": "^1.13.2", + "aptos": "^1.21.0" + } + }, + "node_modules/@xlabs-libs/wallet-aggregator-aptos/node_modules/petra-plugin-wallet-adapter/node_modules/@aptos-labs/wallet-standard": { + "version": "0.0.11", + "resolved": "https://registry.npmjs.org/@aptos-labs/wallet-standard/-/wallet-standard-0.0.11.tgz", + "integrity": "sha512-8dygyPBby7TaMJjUSyeVP4R1WC9D/FPpX9gVMMLaqTKCXrSbkzhGDxcuwbMZ3ziEwRmx3zz+d6BIJbDhd0hm5g==", + "dependencies": { + "@aptos-labs/ts-sdk": "^1.9.1", + "@wallet-standard/core": "1.0.3" + } + }, "node_modules/@xlabs-libs/wallet-aggregator-core": { "version": "0.0.1-alpha.22", "resolved": "https://registry.npmjs.org/@xlabs-libs/wallet-aggregator-core/-/wallet-aggregator-core-0.0.1-alpha.22.tgz", @@ -19375,14 +19696,14 @@ "peer": true }, "node_modules/aptos": { - "version": "1.21.0", - "resolved": "https://registry.npmjs.org/aptos/-/aptos-1.21.0.tgz", - "integrity": "sha512-PRKjoFgL8tVEc9+oS7eJUv8GNxx8n3+0byH2+m7CP3raYOD6yFKOecuwjVMIJmgfpjp6xH0P0HDMGZAXmSyU0Q==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/aptos/-/aptos-1.5.0.tgz", + "integrity": "sha512-N7OuRtU7IYHkDkNx+4QS3g/QQGCp+36KzYn3oXPmT7Kttfuv+UKliQVdjy3cLmwd/DCQSh9ObTovwdxnHjUn0g==", + "deprecated": "Package aptos is no longer supported, please migrate to https://www.npmjs.com/package/@aptos-labs/ts-sdk", "dependencies": { - "@aptos-labs/aptos-client": "^0.1.0", - "@noble/hashes": "1.3.3", - "@scure/bip39": "1.2.1", - "eventemitter3": "^5.0.1", + "@noble/hashes": "1.1.3", + "@scure/bip39": "1.1.0", + "axios": "0.27.2", "form-data": "4.0.0", "tweetnacl": "1.0.3" }, @@ -19391,32 +19712,39 @@ } }, "node_modules/aptos/node_modules/@noble/hashes": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", - "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==", - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.1.3.tgz", + "integrity": "sha512-CE0FCR57H2acVI5UOzIGSSIYxZ6v/HOhDR0Ro9VLyhnzLwx0o8W1mmgaqlEUx4049qJDlIBRztv5k+MM8vbO3A==", + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ] }, "node_modules/aptos/node_modules/@scure/bip39": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.1.tgz", - "integrity": "sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.1.0.tgz", + "integrity": "sha512-pwrPOS16VeTKg98dYXQyIjJEcWfz7/1YJIwxUEPFfQPtc86Ym/1sVgQ2RLoD43AazMk2l/unK4ITySSpW2+82w==", + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], "dependencies": { - "@noble/hashes": "~1.3.0", + "@noble/hashes": "~1.1.1", "@scure/base": "~1.1.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" } }, - "node_modules/aptos/node_modules/eventemitter3": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", - "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==" + "node_modules/aptos/node_modules/axios": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", + "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", + "dependencies": { + "follow-redirects": "^1.14.9", + "form-data": "^4.0.0" + } }, "node_modules/arg": { "version": "5.0.2", @@ -24064,6 +24392,51 @@ "tweetnacl": "^1.0.3" } }, + "node_modules/fewcha-plugin-wallet-adapter/node_modules/@noble/hashes": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", + "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/fewcha-plugin-wallet-adapter/node_modules/@scure/bip39": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.1.tgz", + "integrity": "sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg==", + "dependencies": { + "@noble/hashes": "~1.3.0", + "@scure/base": "~1.1.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/fewcha-plugin-wallet-adapter/node_modules/aptos": { + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/aptos/-/aptos-1.21.0.tgz", + "integrity": "sha512-PRKjoFgL8tVEc9+oS7eJUv8GNxx8n3+0byH2+m7CP3raYOD6yFKOecuwjVMIJmgfpjp6xH0P0HDMGZAXmSyU0Q==", + "deprecated": "Package aptos is no longer supported, please migrate to https://www.npmjs.com/package/@aptos-labs/ts-sdk", + "dependencies": { + "@aptos-labs/aptos-client": "^0.1.0", + "@noble/hashes": "1.3.3", + "@scure/bip39": "1.2.1", + "eventemitter3": "^5.0.1", + "form-data": "4.0.0", + "tweetnacl": "1.0.3" + }, + "engines": { + "node": ">=11.0.0" + } + }, + "node_modules/fewcha-plugin-wallet-adapter/node_modules/aptos/node_modules/eventemitter3": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==" + }, "node_modules/fflate": { "version": "0.4.8", "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.4.8.tgz", @@ -30385,18 +30758,6 @@ "node": ">=0.12" } }, - "node_modules/petra-plugin-wallet-adapter": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/petra-plugin-wallet-adapter/-/petra-plugin-wallet-adapter-0.4.5.tgz", - "integrity": "sha512-x2S2xRAIz/5ytbB2wHCTJhqLBDsgWPEVmj7X2aril1BUplIGPJHTstgo8hqOngb2rtYbBY+wviyS9Di4IDCGRA==", - "dependencies": { - "@aptos-labs/wallet-adapter-core": "^3.5.0" - }, - "peerDependencies": { - "@aptos-labs/ts-sdk": "^1.3.0", - "aptos": "^1.21.0" - } - }, "node_modules/picocolors": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", diff --git a/apps/connect/package.json b/apps/connect/package.json index 9bc76adda..bd46b0495 100644 --- a/apps/connect/package.json +++ b/apps/connect/package.json @@ -24,6 +24,7 @@ "test:watch": "cross-env VITE_APP_CLUSTER=Mainnet jest --coverage --watchAll=true" }, "dependencies": { + "@aptos-labs/ts-sdk": "^1.33.1", "@certusone/wormhole-sdk": "^0.10.18", "@emotion/react": "^11.11.1", "@emotion/styled": "^11.11.0", @@ -32,7 +33,6 @@ "@tanstack/react-query": "^5.14.2", "@wormhole-foundation/sdk": "^1.0.0", "@wormhole-foundation/wormhole-connect": "^1.1.10-beta.2-development", - "aptos": "^1.21.0", "bech32": "^2.0.0", "dompurify": "^3.0.6", "mixpanel-browser": "^2.53.0", diff --git a/apps/connect/src/env/common.ts b/apps/connect/src/env/common.ts index fafb2a5ee..b723ecaad 100644 --- a/apps/connect/src/env/common.ts +++ b/apps/connect/src/env/common.ts @@ -34,7 +34,7 @@ export const MAINNET_RPCS = { ...rpcs(chains, asRpcHost), Klaytn: "https://public-en.node.kaia.io/", Solana: "https://wormhole.rpcpool.com/", - Aptos: "https://and76cjzpa.execute-api.us-east-2.amazonaws.com/aptos", + Aptos: "https://and76cjzpa.execute-api.us-east-2.amazonaws.com/aptos/v1", }; export const PUBLIC_URL = envVars.VITE_PUBLIC_URL || ""; diff --git a/apps/connect/src/utils/isValidAddress.ts b/apps/connect/src/utils/isValidAddress.ts index bab73d1ee..da4b10676 100644 --- a/apps/connect/src/utils/isValidAddress.ts +++ b/apps/connect/src/utils/isValidAddress.ts @@ -1,7 +1,7 @@ import base58 from "bs58"; import * as ethers from "ethers"; import { isCosmWasmChain, isEVMChain } from "@certusone/wormhole-sdk"; -import { AptosClient } from "aptos"; +import { AptosConfig, Aptos, Network } from "@aptos-labs/ts-sdk"; import { bech32 } from "bech32"; import { Chain } from "@wormhole-foundation/sdk"; import { toChainNameFormat } from "./transferVerification"; @@ -49,10 +49,11 @@ const isValidSolanaAddress = (address: string): boolean => { }; // Aptos Validation -const aptosClient = new AptosClient("https://api.mainnet.aptoslabs.com/v1"); +const config = new AptosConfig({ network: Network.MAINNET }); +const aptos = new Aptos(config); const isValidAptosAddress = async (address: string) => { try { - return !!(await aptosClient.getAccount(address)); + return !!(await aptos.getAccountInfo({ accountAddress: address })); } catch { return false; }