Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: near-api-js@5.0.0 #1183

Merged
merged 13 commits into from
Mar 7, 2025
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
"ethers": "5.7.2",
"https-browserify": "1.0.0",
"is-mobile": "4.0.0",
"near-api-js": "4.0.3",
"near-api-js": "5.0.0",
"near-seed-phrase": "0.2.0",
"next": "13.3.0",
"ngx-deploy-npm": "7.1.0",
Expand Down Expand Up @@ -149,6 +149,8 @@
"@angular/language-service": "15.2.9",
"@babel/preset-react": "7.16.7",
"@babel/runtime": "7.24.8",
"@near-js/keystores": "0.2.0",
"@near-js/types": "0.3.0",
"@nrwl/js": "16.0.0",
"@nrwl/rollup": "16.0.0",
"@nrwl/tao": "16.0.0",
Expand Down
4 changes: 3 additions & 1 deletion packages/account-export/src/lib/components/ExportAccount.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,9 @@ export const ExportAccount: React.FC<ExportAccountProps> = ({
setIsLoading(true);
const accountsWithDetails = await Promise.all(
accounts.map(async ({ accountId, privateKey }) => {
const keyPair = nearAPI.utils.KeyPair.fromString(privateKey);
const keyPair = nearAPI.utils.KeyPair.fromString(
privateKey as nearAPI.utils.KeyPairString
);
const { type } = await getAccountType({
provider,
accountId,
Expand Down
1 change: 1 addition & 0 deletions packages/arepa-wallet/src/lib/arepa-wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ const ArepaWallet: WalletBehaviourFactory<
methodNames,
successUrl,
failureUrl,
keyType: "ed25519",
});

return getAccounts();
Expand Down
1 change: 1 addition & 0 deletions packages/my-near-wallet/src/lib/my-near-wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ const MyNearWallet: WalletBehaviourFactory<
methodNames,
successUrl,
failureUrl,
keyType: "ed25519",
});

return getAccounts();
Expand Down
176 changes: 147 additions & 29 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4257,6 +4257,25 @@
lru_map "0.4.1"
near-abi "0.1.1"

"@near-js/accounts@1.3.0":
version "1.3.0"
resolved "https://registry.yarnpkg.com/@near-js/accounts/-/accounts-1.3.0.tgz#388761d164c64b03d3e42315d2e5346ee22fbf97"
integrity sha512-syUgc7EanfN2sX2UJsmJIcZ6OuQ5Ilr/GoVSD8MVOV7B5dT1HZSkMuIBdu+pKfmBbG3EGUOoT8Txxs8Nx96gGA==
dependencies:
"@near-js/crypto" "1.4.0"
"@near-js/providers" "1.0.0"
"@near-js/signers" "0.2.0"
"@near-js/transactions" "1.3.0"
"@near-js/types" "0.3.0"
"@near-js/utils" "1.0.0"
"@noble/hashes" "1.3.3"
borsh "1.0.0"
depd "2.0.0"
is-my-json-valid "^2.20.6"
isomorphic-unfetch "^3.1.0"
lru_map "0.4.1"
near-abi "0.1.1"

"@near-js/crypto@1.2.4", "@near-js/crypto@^1.2.4":
version "1.2.4"
resolved "https://registry.yarnpkg.com/@near-js/crypto/-/crypto-1.2.4.tgz#fad977d6a6d2c0c836ef42db8c8d355c1f433ec0"
Expand All @@ -4280,6 +4299,18 @@
randombytes "2.1.0"
secp256k1 "5.0.0"

"@near-js/crypto@1.4.0":
version "1.4.0"
resolved "https://registry.yarnpkg.com/@near-js/crypto/-/crypto-1.4.0.tgz#52717d7aa0baf5429b0d5a1971a3c9a6e0aeedd9"
integrity sha512-2SYS7LyFz2/y8idqAyyS4jf3pn6zFg4tLbOq9OlB+MTZhvsnUcWW+HLznyBytp6dW8lAQ03E+Ew0bYfJSCIJJw==
dependencies:
"@near-js/types" "0.3.0"
"@near-js/utils" "1.0.0"
"@noble/curves" "1.2.0"
borsh "1.0.0"
randombytes "2.1.0"
secp256k1 "5.0.0"

"@near-js/keystores-browser@0.0.12":
version "0.0.12"
resolved "https://registry.yarnpkg.com/@near-js/keystores-browser/-/keystores-browser-0.0.12.tgz#2a9794a27d1e55ccb549125b29e183eb967fe52c"
Expand All @@ -4296,6 +4327,14 @@
"@near-js/crypto" "1.3.0"
"@near-js/keystores" "0.1.0"

"@near-js/keystores-browser@0.2.0":
version "0.2.0"
resolved "https://registry.yarnpkg.com/@near-js/keystores-browser/-/keystores-browser-0.2.0.tgz#d6cab4b52615e49fea5a1c9fa537d428a30cf0e5"
integrity sha512-vR6XY5ztAzXwNqEipfkwfG6M8PiNNgdDAdogTQBm0FKQUegMsxbMN6x4UyTd1v0oQAzuRmYGwTLmTxQyzH1FQA==
dependencies:
"@near-js/crypto" "1.4.0"
"@near-js/keystores" "0.2.0"

"@near-js/keystores-node@0.0.12":
version "0.0.12"
resolved "https://registry.yarnpkg.com/@near-js/keystores-node/-/keystores-node-0.0.12.tgz#81efaa707faf0cdfc91075920a66be008fbfed8a"
Expand All @@ -4312,6 +4351,14 @@
"@near-js/crypto" "1.3.0"
"@near-js/keystores" "0.1.0"

"@near-js/keystores-node@0.1.0":
version "0.1.0"
resolved "https://registry.yarnpkg.com/@near-js/keystores-node/-/keystores-node-0.1.0.tgz#19baea9d2e492e786be68b8c8b9e0b8c5a4d1b69"
integrity sha512-SOtwrXWwGRbYqqu6TOO3jcCDkzSw+UG+SWVh5VbeTgHIzqR1CI4r4qhyXuTWZPyewJPDogO1ggepQi9NhfkJmA==
dependencies:
"@near-js/crypto" "1.4.0"
"@near-js/keystores" "0.2.0"

"@near-js/keystores@0.0.12":
version "0.0.12"
resolved "https://registry.yarnpkg.com/@near-js/keystores/-/keystores-0.0.12.tgz#747101d9df8fe55870edd317ab3300a5bd33119d"
Expand All @@ -4328,6 +4375,14 @@
"@near-js/crypto" "1.3.0"
"@near-js/types" "0.2.1"

"@near-js/keystores@0.2.0":
version "0.2.0"
resolved "https://registry.yarnpkg.com/@near-js/keystores/-/keystores-0.2.0.tgz#f309716381d3acf402951a96cb6fa551fe1950d2"
integrity sha512-vZiyx9whLlA7/EDdkZGf//0AL2FWAUyGpVhWIHcbJZwQ7DNcjpkb0tRydFp8Yk4bb7kcYnoyksSeRx9kQUMyjA==
dependencies:
"@near-js/crypto" "1.4.0"
"@near-js/types" "0.3.0"

"@near-js/providers@0.2.2":
version "0.2.2"
resolved "https://registry.yarnpkg.com/@near-js/providers/-/providers-0.2.2.tgz#672f914e97b2de94905e46efe724470ae9ea31a2"
Expand All @@ -4354,6 +4409,20 @@
optionalDependencies:
node-fetch "2.6.7"

"@near-js/providers@1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@near-js/providers/-/providers-1.0.0.tgz#72faaf6e335ee515abee941b09bd1a19b0c7857f"
integrity sha512-1++g0tVuHQWewkdmom3Iz5BSVT+KHgG7TX5YHywecg4uGLGhaf5oX1EPCXf/CYnTV61FjaNGIrIMNgwbGzacpw==
dependencies:
"@near-js/transactions" "1.3.0"
"@near-js/types" "0.3.0"
"@near-js/utils" "1.0.0"
borsh "1.0.0"
exponential-backoff "^3.1.1"
isomorphic-unfetch "^3.1.0"
optionalDependencies:
node-fetch "2.6.7"

"@near-js/signers@0.1.4":
version "0.1.4"
resolved "https://registry.yarnpkg.com/@near-js/signers/-/signers-0.1.4.tgz#76b8d29fd9577171f546323cc95502bcf80d00ec"
Expand All @@ -4372,6 +4441,15 @@
"@near-js/keystores" "0.1.0"
"@noble/hashes" "1.3.3"

"@near-js/signers@0.2.0":
version "0.2.0"
resolved "https://registry.yarnpkg.com/@near-js/signers/-/signers-0.2.0.tgz#acedfb7366fc54d049e1a5b95a8b6a1b71840b09"
integrity sha512-plzTnjI7IodTtMwGe2m1bg1ZwGeHeKanJqVoXFypZj7gOuuqVOi+9vcHdSu7T2McnzRujPQbj31PmfDQ3O3YCw==
dependencies:
"@near-js/crypto" "1.4.0"
"@near-js/keystores" "0.2.0"
"@noble/hashes" "1.3.3"

"@near-js/transactions@1.2.2":
version "1.2.2"
resolved "https://registry.yarnpkg.com/@near-js/transactions/-/transactions-1.2.2.tgz#7302f8dd7dc3ea87cd2ebafa0b86bed12232a034"
Expand All @@ -4396,11 +4474,28 @@
"@noble/hashes" "1.3.3"
borsh "1.0.0"

"@near-js/transactions@1.3.0":
version "1.3.0"
resolved "https://registry.yarnpkg.com/@near-js/transactions/-/transactions-1.3.0.tgz#d8801c449c3609d2bb4e7a7b93c1d28d272f160d"
integrity sha512-M9DuFX009E5twEbPV9Fs67nNu8T8segE7yG57q02MmPMOQ7RDanHA2fKqARsltTZ26EEXb92x3lAKt7qFdCfCw==
dependencies:
"@near-js/crypto" "1.4.0"
"@near-js/signers" "0.2.0"
"@near-js/types" "0.3.0"
"@near-js/utils" "1.0.0"
"@noble/hashes" "1.3.3"
borsh "1.0.0"

"@near-js/types@0.2.1", "@near-js/types@^0.2.1":
version "0.2.1"
resolved "https://registry.yarnpkg.com/@near-js/types/-/types-0.2.1.tgz#a298f0e70dbe059ee8c762dfac05c2eae3e0ae0e"
integrity sha512-YygQEGMdFe6d2e/6dtNZer9paH396XeAdIKEhY/RPXDUnjDdfiDQ5DK4mM130sEeID2bAH9X1LQ+7vXGRjvyWw==

"@near-js/types@0.3.0":
version "0.3.0"
resolved "https://registry.yarnpkg.com/@near-js/types/-/types-0.3.0.tgz#aa5fa1097c338166c5401bfb16de26385c3ddc74"
integrity sha512-IwayA5Wa4+hryo22AuAYIu5a/nOAheF/Bmz9kpuouX9L4he+Tc8xAt5NfE60zXG7tsukAw1QAaHE1kBzhmwtKw==

"@near-js/utils@0.2.2", "@near-js/utils@^0.2.2":
version "0.2.2"
resolved "https://registry.yarnpkg.com/@near-js/utils/-/utils-0.2.2.tgz#a42c29db9ccd5a02ad583319028fdb7231821ab2"
Expand All @@ -4421,6 +4516,16 @@
depd "2.0.0"
mustache "4.0.0"

"@near-js/utils@1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@near-js/utils/-/utils-1.0.0.tgz#10d94a2b4c307ee7e44775a723a0005eb293735a"
integrity sha512-4dd6fDgWZnG+0VSKPBA3czEQdi9UotepdwcEKLTbXepIL1FX2ZlQV6HVi7KYmrAVwv1ims11vGnWzJWKy46ULw==
dependencies:
"@near-js/types" "0.3.0"
bs58 "4.0.0"
depd "2.0.0"
mustache "4.0.0"

"@near-js/wallet-account@1.2.2":
version "1.2.2"
resolved "https://registry.yarnpkg.com/@near-js/wallet-account/-/wallet-account-1.2.2.tgz#c04e3e515bd3ca93bafbb761c9770d2fdc078837"
Expand Down Expand Up @@ -4451,6 +4556,21 @@
"@near-js/utils" "0.3.0"
borsh "1.0.0"

"@near-js/wallet-account@1.3.0":
version "1.3.0"
resolved "https://registry.yarnpkg.com/@near-js/wallet-account/-/wallet-account-1.3.0.tgz#9b3e3aee5f2afbaaa2da6f58daad3cd5f8ecb6e8"
integrity sha512-5gqwLXZsGkDMnEIZU7HnJEFol7ICno7wCnwGXHl7VhjBzve5OfaRt/IQpQitogoAUlonpQYmOi2r5qu76nj1lw==
dependencies:
"@near-js/accounts" "1.3.0"
"@near-js/crypto" "1.4.0"
"@near-js/keystores" "0.2.0"
"@near-js/providers" "1.0.0"
"@near-js/signers" "0.2.0"
"@near-js/transactions" "1.3.0"
"@near-js/types" "0.3.0"
"@near-js/utils" "1.0.0"
borsh "1.0.0"

"@near-snap/sdk@0.6.0":
version "0.6.0"
resolved "https://registry.yarnpkg.com/@near-snap/sdk/-/sdk-0.6.0.tgz#2c889dcb5c9e08c63363d600db3f66f7c7b40242"
Expand Down Expand Up @@ -15385,7 +15505,7 @@ isobject@^3.0.1:
resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df"
integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==

isomorphic-unfetch@3.1.0:
isomorphic-unfetch@3.1.0, isomorphic-unfetch@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/isomorphic-unfetch/-/isomorphic-unfetch-3.1.0.tgz#87341d5f4f7b63843d468438128cb087b7c3e98f"
integrity sha512-geDJjpoZ8N0kWexiwkX8F9NkTsXhetLPVbZFQ+JTW239QNOwvB0gniuR1Wc6f0AMTn7/mFGyXvHTifrCp/GH8Q==
Expand Down Expand Up @@ -17711,6 +17831,29 @@ near-api-js@4.0.3, near-api-js@^4.0.0:
near-abi "0.1.1"
node-fetch "2.6.7"

near-api-js@5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/near-api-js/-/near-api-js-5.0.0.tgz#1eb9c6f3611870e64fa63c65f45253e3350b81d0"
integrity sha512-JQBWG2TGSNx4EJKFtsz2lhadFYtZofyJjwigIqlKjBXQluG5DepM5ZdPJSTZ3R526OoqOcGq7MeZMYlW+hn2nw==
dependencies:
"@near-js/accounts" "1.3.0"
"@near-js/crypto" "1.4.0"
"@near-js/keystores" "0.2.0"
"@near-js/keystores-browser" "0.2.0"
"@near-js/keystores-node" "0.1.0"
"@near-js/providers" "1.0.0"
"@near-js/signers" "0.2.0"
"@near-js/transactions" "1.3.0"
"@near-js/types" "0.3.0"
"@near-js/utils" "1.0.0"
"@near-js/wallet-account" "1.3.0"
"@noble/curves" "1.2.0"
borsh "1.0.0"
depd "2.0.0"
http-errors "1.7.2"
near-abi "0.1.1"
node-fetch "2.6.7"

near-api-js@^4.0.3:
version "4.0.4"
resolved "https://registry.yarnpkg.com/near-api-js/-/near-api-js-4.0.4.tgz#e04ef1fa051d3291c1a9bf1b4f07f880c49f80ca"
Expand Down Expand Up @@ -21692,16 +21835,7 @@ string-range@~1.2, string-range@~1.2.1:
resolved "https://registry.yarnpkg.com/string-range/-/string-range-1.2.2.tgz#a893ed347e72299bc83befbbf2a692a8d239d5dd"
integrity sha512-tYft6IFi8SjplJpxCUxyqisD3b+R2CSkomrtJYCkvuf1KuCAWgz7YXt4O0jip7efpfCemwHEzTEAO8EuOYgh3w==

"string-width-cjs@npm:string-width@^4.2.0":
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
dependencies:
emoji-regex "^8.0.0"
is-fullwidth-code-point "^3.0.0"
strip-ansi "^6.0.1"

"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
Expand Down Expand Up @@ -21800,14 +21934,7 @@ string_decoder@~1.1.1:
dependencies:
safe-buffer "~5.1.0"

"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
dependencies:
ansi-regex "^5.0.1"

strip-ansi@^6.0.0, strip-ansi@^6.0.1:
"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
Expand Down Expand Up @@ -23610,7 +23737,7 @@ wordwrap@^1.0.0:
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb"
integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==

"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
Expand All @@ -23628,15 +23755,6 @@ wrap-ansi@^6.0.1, wrap-ansi@^6.2.0:
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
dependencies:
ansi-styles "^4.0.0"
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^8.1.0:
version "8.1.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"
Expand Down