From dbfd824495711d73da708aaa7f3823a817cec82e Mon Sep 17 00:00:00 2001 From: MantisClone Date: Fri, 14 Jun 2024 14:42:09 -0400 Subject: [PATCH 1/2] chore: update to near-api-js 4.0.2 --- packages/payment-processor/package.json | 2 +- .../src/payment/utils-near.ts | 6 + yarn.lock | 428 +++++++++--------- 3 files changed, 224 insertions(+), 212 deletions(-) diff --git a/packages/payment-processor/package.json b/packages/payment-processor/package.json index 9639da8927..af58505fa0 100644 --- a/packages/payment-processor/package.json +++ b/packages/payment-processor/package.json @@ -47,7 +47,7 @@ "@requestnetwork/utils": "0.43.0", "@superfluid-finance/sdk-core": "0.5.0", "ethers": "5.5.1", - "near-api-js": "2.1.4", + "near-api-js": "^4.0.2", "tslib": "2.5.0" }, "devDependencies": { diff --git a/packages/payment-processor/src/payment/utils-near.ts b/packages/payment-processor/src/payment/utils-near.ts index a88bd093ff..0bc5aacec6 100644 --- a/packages/payment-processor/src/payment/utils-near.ts +++ b/packages/payment-processor/src/payment/utils-near.ts @@ -44,6 +44,7 @@ export const isNearAccountSolvent = ( const fungibleContract = new Contract(nearWalletConnection.account(), token.value, { changeMethods: [], viewMethods: ['ft_balance_of'], + useLocalViewExecution: true, }) as any; return fungibleContract .ft_balance_of({ @@ -88,6 +89,7 @@ export const processNearPayment = async ( { changeMethods: ['transfer_with_reference'], viewMethods: [], + useLocalViewExecution: true, }, ) as any; await contract.transfer_with_reference({ @@ -145,6 +147,7 @@ export const processNearPaymentWithConversion = async ( { changeMethods: ['transfer_with_reference'], viewMethods: [], + useLocalViewExecution: true, }, ) as any; await contract.transfer_with_reference({ @@ -181,6 +184,7 @@ export const processNearFungiblePayment = async ( const fungibleContract = new Contract(walletConnection.account(), currencyAddress, { changeMethods: ['ft_transfer_call'], viewMethods: [], + useLocalViewExecution: true, }) as any; const proxyAddress = erc20FeeProxyArtifact.getAddress(network, 'near'); @@ -224,6 +228,7 @@ export const storageDeposit = async ( const fungibleContract = new Contract(walletConnection.account(), tokenAddress, { changeMethods: ['storage_deposit'], viewMethods: [], + useLocalViewExecution: true, }) as any; await fungibleContract.storage_deposit({ args: { account_id: paymentAddress }, @@ -247,6 +252,7 @@ export const isReceiverReady = async ( const fungibleContract = new Contract(walletConnection.account(), tokenAddress, { changeMethods: [], viewMethods: ['storage_balance_of'], + useLocalViewExecution: true, }) as any; const storage = (await fungibleContract.storage_balance_of({ account_id: paymentAddress, diff --git a/yarn.lock b/yarn.lock index 241ee81951..10a94b9abb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3559,125 +3559,121 @@ outvariant "^1.2.1" strict-event-emitter "^0.5.1" -"@near-js/accounts@0.1.4": - version "0.1.4" - resolved "https://registry.yarnpkg.com/@near-js/accounts/-/accounts-0.1.4.tgz#ff557dc65c5064ee4ac2dbfdd39aa3e35ae4d222" - integrity sha512-zHFmL4OUZ4qHXOE+dDBkYgTNHLWC5RmYUVp9LiuGciO5zFPp7WlxmowJL0QjgXqV1w+dNXq3mgmkfAgYVS8Xjw== - dependencies: - "@near-js/crypto" "0.0.5" - "@near-js/providers" "0.0.7" - "@near-js/signers" "0.0.5" - "@near-js/transactions" "0.2.1" - "@near-js/types" "0.0.4" - "@near-js/utils" "0.0.4" - ajv "^8.11.2" - ajv-formats "^2.1.1" - bn.js "5.2.1" - borsh "^0.7.0" - depd "^2.0.0" +"@near-js/accounts@1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@near-js/accounts/-/accounts-1.2.1.tgz#6e5c0315a07997bbaacbe7b9021ac23974a80ea0" + integrity sha512-j6+9n/p0vVLAahmN3YRFve+j0ammOALC9ZUfFhdE3kqtJESbSWMviC5qF/s2m0JQjpJGDtEv/dTADosIJoanWw== + dependencies: + "@near-js/crypto" "1.2.4" + "@near-js/providers" "0.2.2" + "@near-js/signers" "0.1.4" + "@near-js/transactions" "1.2.2" + "@near-js/types" "0.2.1" + "@near-js/utils" "0.2.2" + borsh "1.0.0" + depd "2.0.0" + is-my-json-valid "^2.20.6" + lru_map "0.4.1" near-abi "0.1.1" -"@near-js/crypto@0.0.5": - version "0.0.5" - resolved "https://registry.yarnpkg.com/@near-js/crypto/-/crypto-0.0.5.tgz#3191cdc8dcdba572bdead482b5d38f364bdcc2a0" - integrity sha512-nbQ971iYES5Spiolt+p568gNuZ//HeMHm3qqT3xT+i8ZzgbC//l6oRf48SUVTPAboQ1TJ5dW/NqcxOY0pe7b4g== +"@near-js/crypto@1.2.4": + version "1.2.4" + resolved "https://registry.yarnpkg.com/@near-js/crypto/-/crypto-1.2.4.tgz#fad977d6a6d2c0c836ef42db8c8d355c1f433ec0" + integrity sha512-hcSj0ygvTcXlW9ftwEd9dbvQUWBCHNWNDLou9NLfmZERW9dr0gH8kUJPZUWfpJFlUPicb+jTiMpNwDTvP7VW4A== dependencies: - "@near-js/types" "0.0.4" - bn.js "5.2.1" - borsh "^0.7.0" - tweetnacl "^1.0.1" + "@near-js/types" "0.2.1" + "@near-js/utils" "0.2.2" + "@noble/curves" "1.2.0" + borsh "1.0.0" + randombytes "2.1.0" -"@near-js/keystores-browser@0.0.5": - version "0.0.5" - resolved "https://registry.yarnpkg.com/@near-js/keystores-browser/-/keystores-browser-0.0.5.tgz#7e94181ca5c4fbad8b8e67cda16888b4ccafae61" - integrity sha512-mHF3Vcvsr7xnkaM/reOyxtykbE3OWKV6vQzqyTH2tZYT2OTEnj0KhRT9BCFC0Ra67K1zQLbg49Yc/kDCc5qupA== +"@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" + integrity sha512-ptoVfJhMsktYcvY02wD2a8kDDH/E4d+kBfhwKF0H/Qt/w4JVJqEVgCLDBYUespuISTSqLSznNBjTSse+E7pJDQ== dependencies: - "@near-js/crypto" "0.0.5" - "@near-js/keystores" "0.0.5" + "@near-js/crypto" "1.2.4" + "@near-js/keystores" "0.0.12" -"@near-js/keystores-node@0.0.5": - version "0.0.5" - resolved "https://registry.yarnpkg.com/@near-js/keystores-node/-/keystores-node-0.0.5.tgz#f474dabbb84590896dd8861bb33a7304580e0d99" - integrity sha512-BYmWyGNydfAqi7eYA1Jo8zULL13cxejD2VBr0BBIXx5bJ+BO4TLecsY1xdTBEq06jyWXHa7kV4h8BJzAjvpTLg== +"@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" + integrity sha512-LUz1HPXBYoZUaLyS/bEj4yZ4pqD9Hb7XURikh22VYL8mbLcR5VmWYwS7Tmi9aO1vW8M9bPnQs5SROAyA79qQgQ== dependencies: - "@near-js/crypto" "0.0.5" - "@near-js/keystores" "0.0.5" + "@near-js/crypto" "1.2.4" + "@near-js/keystores" "0.0.12" -"@near-js/keystores@0.0.5": - version "0.0.5" - resolved "https://registry.yarnpkg.com/@near-js/keystores/-/keystores-0.0.5.tgz#44ec009b23c552809b6f9bc9a83632f79de4112b" - integrity sha512-kxqV+gw/3L8/axe9prhlU+M0hfybkxX54xfI0EEpWP2QiUV+qw+jkKolYIbdk5tdEZrGf9jHawh1yFtwP7APPQ== +"@near-js/keystores@0.0.12": + version "0.0.12" + resolved "https://registry.yarnpkg.com/@near-js/keystores/-/keystores-0.0.12.tgz#747101d9df8fe55870edd317ab3300a5bd33119d" + integrity sha512-7dqq7XLUSlo26QbaGrS6bmqVL4IfhxJgfIhgKUDfv8FuswrpErBVCAUY6wIbW+mLw0NBoddzPrb5LuLIMfud5Q== dependencies: - "@near-js/crypto" "0.0.5" - "@near-js/types" "0.0.4" + "@near-js/crypto" "1.2.4" + "@near-js/types" "0.2.1" -"@near-js/providers@0.0.7": - version "0.0.7" - resolved "https://registry.yarnpkg.com/@near-js/providers/-/providers-0.0.7.tgz#b2189e5d14d1afb1798c91c59e6dfb9bb476f46b" - integrity sha512-qj16Ey+vSw7lHE85xW+ykYJoLPr4A6Q/TsfpwhJLS6zBInSC6sKVqPO1L8bK4VA/yB7V7JJPor9UVCWgRXdNEA== - dependencies: - "@near-js/transactions" "0.2.1" - "@near-js/types" "0.0.4" - "@near-js/utils" "0.0.4" - bn.js "5.2.1" - borsh "^0.7.0" - http-errors "^1.7.2" +"@near-js/providers@0.2.2": + version "0.2.2" + resolved "https://registry.yarnpkg.com/@near-js/providers/-/providers-0.2.2.tgz#672f914e97b2de94905e46efe724470ae9ea31a2" + integrity sha512-1V3NhqxfkBvdvq8zhKqbKxsySpIr6PpmlDzkHjDr8uSu6MMvqBgy+1dBvWflEFlN7OlDGx35mVsq/4Xy0wu+KA== + dependencies: + "@near-js/transactions" "1.2.2" + "@near-js/types" "0.2.1" + "@near-js/utils" "0.2.2" + borsh "1.0.0" + http-errors "1.7.2" optionalDependencies: - node-fetch "^2.6.1" + node-fetch "2.6.7" -"@near-js/signers@0.0.5": - version "0.0.5" - resolved "https://registry.yarnpkg.com/@near-js/signers/-/signers-0.0.5.tgz#f3f946440314bf039dd32154928163ceaec8bedb" - integrity sha512-XJjYYatehxHakHa7WAoiQ8uIBSWBR2EnO4GzlIe8qpWL+LoH4t68MSezC1HwT546y9YHIvePjwDrBeYk8mg20w== +"@near-js/signers@0.1.4": + version "0.1.4" + resolved "https://registry.yarnpkg.com/@near-js/signers/-/signers-0.1.4.tgz#76b8d29fd9577171f546323cc95502bcf80d00ec" + integrity sha512-YgH5X5fDOT/GsEAcyNM3heQWjIIL1MW3P8NtqilMa69HnsvtES9RCwjAXP8d8DZq/dBlI9od+pQ5XhxSFuXKCg== dependencies: - "@near-js/crypto" "0.0.5" - "@near-js/keystores" "0.0.5" - js-sha256 "^0.9.0" + "@near-js/crypto" "1.2.4" + "@near-js/keystores" "0.0.12" + "@noble/hashes" "1.3.3" -"@near-js/transactions@0.2.1": - version "0.2.1" - resolved "https://registry.yarnpkg.com/@near-js/transactions/-/transactions-0.2.1.tgz#ab6d246e94e6f64b4e5a651fe6e9de03dd573521" - integrity sha512-V9tXzkICDPruSxihKXkBhUgsI4uvW7TwXlnZS2GZpPsFFiIUeGrso0wo4uiQwB6miFA5q6fKaAtQa4F2v1s+zg== - dependencies: - "@near-js/crypto" "0.0.5" - "@near-js/signers" "0.0.5" - "@near-js/types" "0.0.4" - "@near-js/utils" "0.0.4" - bn.js "5.2.1" - borsh "^0.7.0" - js-sha256 "^0.9.0" - -"@near-js/types@0.0.4": - version "0.0.4" - resolved "https://registry.yarnpkg.com/@near-js/types/-/types-0.0.4.tgz#d941689df41c850aeeeaeb9d498418acec515404" - integrity sha512-8TTMbLMnmyG06R5YKWuS/qFG1tOA3/9lX4NgBqQPsvaWmDsa+D+QwOkrEHDegped0ZHQwcjAXjKML1S1TyGYKg== +"@near-js/transactions@1.2.2": + version "1.2.2" + resolved "https://registry.yarnpkg.com/@near-js/transactions/-/transactions-1.2.2.tgz#7302f8dd7dc3ea87cd2ebafa0b86bed12232a034" + integrity sha512-WZ/Mk0hFvBIYcD6VBwYw4S2mmiKBKz6PT0YEwNzMzbgPZSs2wRVk4r9Tf+ueCJCPUXo5XINkjThCcRqMHQvPtg== dependencies: - bn.js "5.2.1" + "@near-js/crypto" "1.2.4" + "@near-js/signers" "0.1.4" + "@near-js/types" "0.2.1" + "@near-js/utils" "0.2.2" + "@noble/hashes" "1.3.3" + borsh "1.0.0" -"@near-js/utils@0.0.4": - version "0.0.4" - resolved "https://registry.yarnpkg.com/@near-js/utils/-/utils-0.0.4.tgz#1a387f81974ebbfa4521c92590232be97e3335dd" - integrity sha512-mPUEPJbTCMicGitjEGvQqOe8AS7O4KkRCxqd0xuE/X6gXF1jz1pYMZn4lNUeUz2C84YnVSGLAM0o9zcN6Y4hiA== +"@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/utils@0.2.2": + version "0.2.2" + resolved "https://registry.yarnpkg.com/@near-js/utils/-/utils-0.2.2.tgz#a42c29db9ccd5a02ad583319028fdb7231821ab2" + integrity sha512-ZAJo/cN6AHY7/gckf8DLHwjAn0z4UwG6rhLxs+QDyNYMMSx9SBg2pOQtBBv7ORWJaPhWD2q7wFhUz4SdTZi43A== dependencies: - "@near-js/types" "0.0.4" - bn.js "5.2.1" - depd "^2.0.0" - mustache "^4.0.0" + "@near-js/types" "0.2.1" + bs58 "4.0.0" + depd "2.0.0" + mustache "4.0.0" -"@near-js/wallet-account@0.0.7": - version "0.0.7" - resolved "https://registry.yarnpkg.com/@near-js/wallet-account/-/wallet-account-0.0.7.tgz#efa6738114171b2a6e40e8b35a8194b7cf86c11e" - integrity sha512-tmRyieG/wHmuNkg/WGFyKD6iH6atHPbY0rZ5OjOIiteuhZEPgp+z8OBpiQ4qumTa63q46aj/QVSQL0J3+JmBfw== - dependencies: - "@near-js/accounts" "0.1.4" - "@near-js/crypto" "0.0.5" - "@near-js/keystores" "0.0.5" - "@near-js/signers" "0.0.5" - "@near-js/transactions" "0.2.1" - "@near-js/types" "0.0.4" - "@near-js/utils" "0.0.4" - bn.js "5.2.1" - borsh "^0.7.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" + integrity sha512-LaWzqaz2tP1hcToDlmiQnFMGZ1W9dM9i4nFSILe5PLIFLBQmYXdLWc80skGDiTUeihVu6wwtQr6Z2CcG231rWw== + dependencies: + "@near-js/accounts" "1.2.1" + "@near-js/crypto" "1.2.4" + "@near-js/keystores" "0.0.12" + "@near-js/providers" "0.2.2" + "@near-js/signers" "0.1.4" + "@near-js/transactions" "1.2.2" + "@near-js/types" "0.2.1" + "@near-js/utils" "0.2.2" + borsh "1.0.0" "@noble/curves@1.1.0", "@noble/curves@~1.1.0": version "1.1.0" @@ -3686,6 +3682,13 @@ dependencies: "@noble/hashes" "1.3.1" +"@noble/curves@1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.2.0.tgz#92d7e12e4e49b23105a2555c6984d41733d65c35" + integrity sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw== + dependencies: + "@noble/hashes" "1.3.2" + "@noble/hashes@1.2.0", "@noble/hashes@~1.2.0": version "1.2.0" resolved "https://registry.npmjs.org/@noble/hashes/-/hashes-1.2.0.tgz" @@ -3696,7 +3699,12 @@ resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.1.tgz#8831ef002114670c603c458ab8b11328406953a9" integrity sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA== -"@noble/hashes@~1.3.0", "@noble/hashes@~1.3.1": +"@noble/hashes@1.3.2": + version "1.3.2" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.2.tgz#6f26dbc8fbc7205873ce3cee2f690eba0d421b39" + integrity sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ== + +"@noble/hashes@1.3.3", "@noble/hashes@~1.3.0", "@noble/hashes@~1.3.1": version "1.3.3" resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.3.tgz#39908da56a4adc270147bb07968bf3b16cfe1699" integrity sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA== @@ -5991,13 +5999,6 @@ ajv-errors@^1.0.1: resolved "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.1.tgz" integrity sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ== -ajv-formats@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ajv-formats/-/ajv-formats-2.1.1.tgz#6e669400659eb74973bbf2e33327180a0996b520" - integrity sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA== - dependencies: - ajv "^8.0.0" - ajv-keywords@^3.5.2: version "3.5.2" resolved "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz" @@ -6043,16 +6044,6 @@ ajv@^7.0.2: require-from-string "^2.0.2" uri-js "^4.2.2" -ajv@^8.0.0, ajv@^8.11.2: - version "8.12.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.12.0.tgz#d1a0527323e22f53562c567c00991577dfbe19d1" - integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== - dependencies: - fast-deep-equal "^3.1.1" - json-schema-traverse "^1.0.0" - require-from-string "^2.0.2" - uri-js "^4.2.2" - ajv@^8.0.1: version "8.11.0" resolved "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz" @@ -7227,6 +7218,13 @@ balanced-match@^1.0.0: resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz" integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= +base-x@^2.0.1: + version "2.0.6" + resolved "https://registry.yarnpkg.com/base-x/-/base-x-2.0.6.tgz#4582a91ebcec99ee06f4e4032030b0cf1c2941d8" + integrity sha512-UAmjxz9KbK+YIi66xej+pZVo/vxUOh49ubEvZW5egCbxhur05pBb+hwuireQwKO4nDpsNm64/jEei17LEpsr5g== + dependencies: + safe-buffer "^5.0.1" + base-x@^3.0.2, base-x@^3.0.8: version "3.0.8" resolved "https://registry.npmjs.org/base-x/-/base-x-3.0.8.tgz" @@ -7415,11 +7413,6 @@ bn.js@4.11.6: resolved "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz" integrity sha1-UzRK2xRhehP26N0s4okF0cC6MhU= -bn.js@5.2.1, bn.js@^5.2.0, bn.js@^5.2.1: - version "5.2.1" - resolved "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz" - integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== - bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.10.0, bn.js@^4.11.0, bn.js@^4.11.1, bn.js@^4.11.6, bn.js@^4.11.8, bn.js@^4.11.9, bn.js@^4.4.0, bn.js@^4.8.0: version "4.12.0" resolved "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz" @@ -7430,6 +7423,11 @@ bn.js@^5.0.0, bn.js@^5.1.2, bn.js@^5.1.3: resolved "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz" integrity sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw== +bn.js@^5.2.1: + version "5.2.1" + resolved "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz" + integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== + body-parser@1.20.2, body-parser@^1.16.0: version "1.20.2" resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.2.tgz#6feb0e21c4724d06de7ff38da36dad4f57a747fd" @@ -7453,14 +7451,10 @@ boolbase@^1.0.0: resolved "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz" integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24= -borsh@^0.7.0: - version "0.7.0" - resolved "https://registry.npmjs.org/borsh/-/borsh-0.7.0.tgz" - integrity sha512-CLCsZGIBCFnPtkNnieW/a8wmreDmfUtjU2m9yHrzPXIlNbqVs0AQrSatSG6vdNYUqdc83tkQi2eHfF98ubzQLA== - dependencies: - bn.js "^5.2.0" - bs58 "^4.0.0" - text-encoding-utf-8 "^1.0.2" +borsh@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/borsh/-/borsh-1.0.0.tgz#b564c8cc8f7a91e3772b9aef9e07f62b84213c1f" + integrity sha512-fSVWzzemnyfF89EPwlUNsrS5swF5CrtiN4e+h0/lLf4dz2he4L3ndM20PS9wj7ICSkXJe/TQUHdaPTq15b1mNQ== brace-expansion@^1.1.7: version "1.1.11" @@ -7752,6 +7746,13 @@ bs-logger@0.x: dependencies: fast-json-stable-stringify "2.x" +bs58@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.0.tgz#65f5deaf6d74e6135a99f763ca6209ab424b9172" + integrity sha512-/jcGuUuSebyxwLLfKrbKnCJttxRf9PM51EnHTwmFKBxl4z1SGkoAhrfd6uZKE0dcjQTfm6XzTP8DPr1tzE4KIw== + dependencies: + base-x "^2.0.1" + bs58@^4.0.0, bs58@^4.0.1: version "4.0.1" resolved "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz" @@ -8168,11 +8169,6 @@ caniuse-lite@^1.0.30001538: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001538.tgz#9dbc6b9af1ff06b5eb12350c2012b3af56744f3f" integrity sha512-HWJnhnID+0YMtGlzcp3T9drmBJUVDchPJ08tpUGFLs9CYlwWPH2uLgpHn8fND5pCgXVtnGS3H4QR9XLMHVNkHw== -capability@^0.2.5: - version "0.2.5" - resolved "https://registry.npmjs.org/capability/-/capability-0.2.5.tgz" - integrity sha1-Ua2HNT8ZNv/Xfy8hx0YzpN6oiAE= - capital-case@^1.0.4: version "1.0.4" resolved "https://registry.npmjs.org/capital-case/-/capital-case-1.0.4.tgz" @@ -9673,7 +9669,7 @@ delegates@^1.0.0: resolved "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz" integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= -depd@2.0.0, depd@^2.0.0, depd@~2.0.0: +depd@2.0.0, depd@~2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz" integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== @@ -10235,15 +10231,6 @@ error-ex@^1.2.0, error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -error-polyfill@^0.1.3: - version "0.1.3" - resolved "https://registry.npmjs.org/error-polyfill/-/error-polyfill-0.1.3.tgz" - integrity sha512-XHJk60ufE+TG/ydwp4lilOog549iiQF2OAPhkk9DdiYWMrltz5yhDz/xnKuenNwP7gy3dsibssO5QpVhkrSzzg== - dependencies: - capability "^0.2.5" - o3 "^1.0.3" - u3 "^0.1.1" - es-abstract@^1.18.0-next.1, es-abstract@^1.18.0-next.2: version "1.18.0" resolved "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0.tgz" @@ -12457,6 +12444,20 @@ gauge@^5.0.0: strip-ansi "^6.0.1" wide-align "^1.1.5" +generate-function@^2.0.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.3.1.tgz#f069617690c10c868e73b8465746764f97c3479f" + integrity sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ== + dependencies: + is-property "^1.0.2" + +generate-object-property@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/generate-object-property/-/generate-object-property-1.2.0.tgz#9c0e1c40308ce804f4783618b937fa88f99d50d0" + integrity sha512-TuOwZWgJ2VAMEGJvAyPWvpqxSANF0LDpmyHauMjFYzaACvn+QTT/AZomvPCzVBV7yDN3OmwHQ5OvHaeLKre3JQ== + dependencies: + is-property "^1.0.0" + gensync@^1.0.0-beta.2: version "1.0.0-beta.2" resolved "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz" @@ -13448,6 +13449,17 @@ http-cache-semantics@^4.0.0, http-cache-semantics@^4.1.0, http-cache-semantics@^ resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz#abe02fcb2985460bf0323be664436ec3476a6d5a" integrity sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ== +http-errors@1.7.2: + version "1.7.2" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.2.tgz#4f5029cf13239f31036e5b2e55292bcfbcc85c8f" + integrity sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg== + dependencies: + depd "~1.1.2" + inherits "2.0.3" + setprototypeof "1.1.1" + statuses ">= 1.5.0 < 2" + toidentifier "1.0.0" + http-errors@1.7.3, http-errors@~1.7.2: version "1.7.3" resolved "https://registry.npmjs.org/http-errors/-/http-errors-1.7.3.tgz" @@ -13470,17 +13482,6 @@ http-errors@2.0.0: statuses "2.0.1" toidentifier "1.0.1" -http-errors@^1.7.2: - version "1.8.0" - resolved "https://registry.npmjs.org/http-errors/-/http-errors-1.8.0.tgz" - integrity sha512-4I8r0C5JDhT5VkvI47QktDW75rNlGVsUf/8hzjCC/wkWI/jdTRmBb9aI7erSG82r1bjKY3F6k28WnsVxB1C73A== - dependencies: - depd "~1.1.2" - inherits "2.0.4" - setprototypeof "1.2.0" - statuses ">= 1.5.0 < 2" - toidentifier "1.0.0" - http-errors@~1.6.2: version "1.6.3" resolved "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz" @@ -14239,6 +14240,22 @@ is-lower-case@^2.0.2: dependencies: tslib "^2.0.3" +is-my-ip-valid@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-my-ip-valid/-/is-my-ip-valid-1.0.1.tgz#f7220d1146257c98672e6fba097a9f3f2d348442" + integrity sha512-jxc8cBcOWbNK2i2aTkCZP6i7wkHF1bqKFrwEHuN5Jtg5BSaZHUZQ/JTOJwoV41YvHnOaRyWWh72T/KvfNz9DJg== + +is-my-json-valid@^2.20.6: + version "2.20.6" + resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.20.6.tgz#a9d89e56a36493c77bda1440d69ae0dc46a08387" + integrity sha512-1JQwulVNjx8UqkPE/bqDaxtH4PXCe/2VRh/y3p99heOV87HG4Id5/VfDswd+YiAfHcRTfDlWgISycnHuhZq1aw== + dependencies: + generate-function "^2.0.0" + generate-object-property "^1.1.0" + is-my-ip-valid "^1.0.0" + jsonpointer "^5.0.0" + xtend "^4.0.0" + is-negated-glob@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/is-negated-glob/-/is-negated-glob-1.0.0.tgz" @@ -14345,6 +14362,11 @@ is-primitive@^2.0.0: resolved "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz" integrity sha1-IHurkWOEmcB7Kt8kCkGochADRXU= +is-property@^1.0.0, is-property@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" + integrity sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g== + is-regex@^1.0.4, is-regex@^1.1.2: version "1.1.2" resolved "https://registry.npmjs.org/is-regex/-/is-regex-1.1.2.tgz" @@ -15046,11 +15068,6 @@ js-levenshtein@^1.1.6: resolved "https://registry.yarnpkg.com/js-levenshtein/-/js-levenshtein-1.1.6.tgz#c6cee58eb3550372df8deb85fad5ce66ce01d59d" integrity sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g== -js-sha256@^0.9.0: - version "0.9.0" - resolved "https://registry.npmjs.org/js-sha256/-/js-sha256-0.9.0.tgz" - integrity sha512-sga3MHh9sgQN2+pJ9VYZ+1LPwXOxuBJBA5nrR5/ofPfuiJBE2hnjsaN8se8JznOmGLN2p49Pe5U/ttafcs/apA== - js-sha3@0.5.7, js-sha3@^0.5.7: version "0.5.7" resolved "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz" @@ -15268,6 +15285,11 @@ jsonparse@^1.2.0, jsonparse@^1.3.1: resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" integrity sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg== +jsonpointer@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-5.0.1.tgz#2110e0af0900fd37467b5907ecd13a7884a1b559" + integrity sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ== + jsprim@^1.2.2: version "1.4.1" resolved "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz" @@ -16042,6 +16064,11 @@ lru-cache@^7.4.4, lru-cache@^7.5.1, lru-cache@^7.7.1: resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.1.0.tgz#2098d41c2dc56500e6c88584aa656c84de7d0484" integrity sha512-/1clY/ui8CzjKFyjdvwPWJUYKiFVXG2I2cY0ssG7h4+hwk+XOIX7ZSG9Q7TW8TW3Kp3BUSqgFWBLgL4PJ+Blag== +lru_map@0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/lru_map/-/lru_map-0.4.1.tgz#f7b4046283c79fb7370c36f8fca6aee4324b0a98" + integrity sha512-I+lBvqMMFfqaV8CJCISjI3wbjmwVu/VyOoU7+qtu9d7ioW5klMgsTTiUOUp+DJvfTTzKXoPbyC6YfgkNcyPSOg== + lru_map@^0.3.3: version "0.3.3" resolved "https://registry.npmjs.org/lru_map/-/lru_map-0.3.3.tgz" @@ -17009,10 +17036,10 @@ multimatch@^2.1.0: arrify "^1.0.0" minimatch "^3.0.0" -mustache@^4.0.0: - version "4.2.0" - resolved "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz" - integrity sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ== +mustache@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/mustache/-/mustache-4.0.0.tgz#7f02465dbb5b435859d154831c032acdfbbefb31" + integrity sha512-FJgjyX/IVkbXBXYUwH+OYwQKqWpFPLaLVESd70yHjSDunwzV2hZOoTBvPf4KLoxesUzzyfTH6F784Uqd7Wm5yA== mute-stream@0.0.7: version "0.0.7" @@ -17083,32 +17110,28 @@ near-abi@0.1.1: dependencies: "@types/json-schema" "^7.0.11" -near-api-js@2.1.4: - version "2.1.4" - resolved "https://registry.yarnpkg.com/near-api-js/-/near-api-js-2.1.4.tgz#562bb7047bf3699fbdf78f9a6620366069ad7cd9" - integrity sha512-e1XicyvJvQMtu7qrG8oWyAdjHJJCoy+cvbW6h2Dky4yj7vC85omQz/x7IgKl71VhzDj2/TGUwjTVESp6NSe75A== - dependencies: - "@near-js/accounts" "0.1.4" - "@near-js/crypto" "0.0.5" - "@near-js/keystores" "0.0.5" - "@near-js/keystores-browser" "0.0.5" - "@near-js/keystores-node" "0.0.5" - "@near-js/providers" "0.0.7" - "@near-js/signers" "0.0.5" - "@near-js/transactions" "0.2.1" - "@near-js/types" "0.0.4" - "@near-js/utils" "0.0.4" - "@near-js/wallet-account" "0.0.7" - ajv "^8.11.2" - ajv-formats "^2.1.1" - bn.js "5.2.1" - borsh "^0.7.0" - depd "^2.0.0" - error-polyfill "^0.1.3" - http-errors "^1.7.2" +near-api-js@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/near-api-js/-/near-api-js-4.0.2.tgz#80ebe802508c0b5caee80214a42f0a4cee571bb3" + integrity sha512-E39xsjWykxOAY6bqVl4q8+TYCfJHKzXEQD8ek82gf58IX8P1STKOS/x0c4yBO9wmSMdv7ZSymmENAozetgdzNQ== + dependencies: + "@near-js/accounts" "1.2.1" + "@near-js/crypto" "1.2.4" + "@near-js/keystores" "0.0.12" + "@near-js/keystores-browser" "0.0.12" + "@near-js/keystores-node" "0.0.12" + "@near-js/providers" "0.2.2" + "@near-js/signers" "0.1.4" + "@near-js/transactions" "1.2.2" + "@near-js/types" "0.2.1" + "@near-js/utils" "0.2.2" + "@near-js/wallet-account" "1.2.2" + "@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.1" - tweetnacl "^1.0.1" + node-fetch "2.6.7" negotiator@0.6.3, negotiator@^0.6.3: version "0.6.3" @@ -17599,13 +17622,6 @@ nx@15.9.7, "nx@>=15.5.2 < 16": "@nrwl/nx-win32-arm64-msvc" "15.9.7" "@nrwl/nx-win32-x64-msvc" "15.9.7" -o3@^1.0.3: - version "1.0.3" - resolved "https://registry.npmjs.org/o3/-/o3-1.0.3.tgz" - integrity sha1-GSzod6iC36Z1HwQSqGX6+y2h2sA= - dependencies: - capability "^0.2.5" - oauth-sign@~0.9.0: version "0.9.0" resolved "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz" @@ -19020,7 +19036,7 @@ randomatic@^3.0.0: kind-of "^6.0.0" math-random "^1.0.1" -randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.0.6, randombytes@^2.1.0: +randombytes@2.1.0, randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.0.6, randombytes@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz" integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== @@ -21419,11 +21435,6 @@ testrpc@0.0.1: resolved "https://registry.npmjs.org/testrpc/-/testrpc-0.0.1.tgz" integrity sha512-afH1hO+SQ/VPlmaLUFj2636QMeDvPCeQMc/9RBMW0IfjNe9gFD9Ra3ShqYkB7py0do1ZcCna/9acHyzTJ+GcNA== -text-encoding-utf-8@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/text-encoding-utf-8/-/text-encoding-utf-8-1.0.2.tgz" - integrity sha512-8bw4MY9WjdsD2aMtO0OzOCY3pXGYNx2d2FfHRVUKkiCPDWjKuOlhLVASS+pD7VkLTVjW268LYJHwsnPFlBpbAg== - text-extensions@^1.0.0: version "1.9.0" resolved "https://registry.npmjs.org/text-extensions/-/text-extensions-1.9.0.tgz" @@ -21892,7 +21903,7 @@ tweetnacl@^0.14.3, tweetnacl@~0.14.0: resolved "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz" integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= -tweetnacl@^1.0.0, tweetnacl@^1.0.1, tweetnacl@^1.0.3: +tweetnacl@^1.0.0, tweetnacl@^1.0.3: version "1.0.3" resolved "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz" integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw== @@ -22123,11 +22134,6 @@ typical@^2.6.0, typical@^2.6.1: resolved "https://registry.npmjs.org/typical/-/typical-2.6.1.tgz" integrity sha1-XAgOXWYcu+OCWdLnCjxyU+hziB0= -u3@^0.1.1: - version "0.1.1" - resolved "https://registry.npmjs.org/u3/-/u3-0.1.1.tgz" - integrity sha512-+J5D5ir763y+Am/QY6hXNRlwljIeRMZMGs0cT6qqZVVzzT3X3nFPXVyPOFRMOR4kupB0T8JnCdpWdp6Q/iXn3w== - ua-parser-js@^0.7.18: version "0.7.34" resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.34.tgz#afb439e2e3e394bdc90080acb661a39c685b67d7" From d70d3000a7db927c5a5a1b298b551e7973ac795c Mon Sep 17 00:00:00 2001 From: MantisClone Date: Fri, 14 Jun 2024 14:55:31 -0400 Subject: [PATCH 2/2] fix: pin near-api-js version --- packages/payment-processor/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/payment-processor/package.json b/packages/payment-processor/package.json index af58505fa0..7100c5e285 100644 --- a/packages/payment-processor/package.json +++ b/packages/payment-processor/package.json @@ -47,7 +47,7 @@ "@requestnetwork/utils": "0.43.0", "@superfluid-finance/sdk-core": "0.5.0", "ethers": "5.5.1", - "near-api-js": "^4.0.2", + "near-api-js": "4.0.2", "tslib": "2.5.0" }, "devDependencies": {