From 4d12a3c9c1b0d65e944e95bcac41d22872913ba1 Mon Sep 17 00:00:00 2001 From: Steven Luscher Date: Mon, 26 Sep 2022 13:51:00 -0700 Subject: [PATCH] feat: teach mobile-wallet-adapter to handle versioned transactions (#254) * chore: upgrade to version of `@solana/web3.js` that supports versioned transactions * chore: advance version of `@solana/wallet-adapter-base` to one that supports versioned transactions * fix: accept versioned transactions --- .../example-react-native-app/package.json | 4 +- examples/example-react-native-app/yarn.lock | 16 +- examples/example-web-app/package.json | 5 +- examples/example-web-app/yarn.lock | 190 ++---------------- .../package.json | 2 +- .../src/transact.ts | 58 +++--- .../src/types.ts | 2 +- .../wallet-adapter-mobile/package.json | 6 +- .../wallet-adapter-mobile/src/adapter.ts | 121 ++++++----- js/yarn.lock | 137 +++---------- 10 files changed, 171 insertions(+), 370 deletions(-) diff --git a/examples/example-react-native-app/package.json b/examples/example-react-native-app/package.json index f8a9e2f45..7157cfeb7 100644 --- a/examples/example-react-native-app/package.json +++ b/examples/example-react-native-app/package.json @@ -13,9 +13,9 @@ "@react-native-async-storage/async-storage": "^1.17.7", "@solana-mobile/mobile-wallet-adapter-protocol": "file:../../js/packages/mobile-wallet-adapter-protocol", "@solana-mobile/mobile-wallet-adapter-protocol-web3js": "file:../../js/packages/mobile-wallet-adapter-protocol-web3js", - "@solana/wallet-adapter-base": "^0.9.8", + "@solana/wallet-adapter-base": "^0.9.17", "@solana/wallet-adapter-react": "^0.15.7", - "@solana/web3.js": "^1.54.1", + "@solana/web3.js": "^1.58.0", "js-base64": "^3.7.2", "localstorage-polyfill": "^1.0.1", "react": "^18.1.0", diff --git a/examples/example-react-native-app/yarn.lock b/examples/example-react-native-app/yarn.lock index 3b406b578..367dabf7d 100644 --- a/examples/example-react-native-app/yarn.lock +++ b/examples/example-react-native-app/yarn.lock @@ -1358,10 +1358,10 @@ dependencies: buffer "~6.0.3" -"@solana/wallet-adapter-base@^0.9.16", "@solana/wallet-adapter-base@^0.9.8": - version "0.9.16" - resolved "https://registry.yarnpkg.com/@solana/wallet-adapter-base/-/wallet-adapter-base-0.9.16.tgz#7b67e145f47a9cdc8e702eacc02fa867084a9bf4" - integrity sha512-nwzpzo3SjjsCkgN5ROQqoL7Y90j4QUlqxL17sg/qMcoYIBVfalyu87IZAfL5B06eSQ8jmtgnuQJW+91WcLo1ag== +"@solana/wallet-adapter-base@^0.9.16", "@solana/wallet-adapter-base@^0.9.17": + version "0.9.17" + resolved "https://registry.yarnpkg.com/@solana/wallet-adapter-base/-/wallet-adapter-base-0.9.17.tgz#b388fea0ec6da40e23342068a4cfa9be65dc8f63" + integrity sha512-YEkO04QndfRXb6psznMuRsw2YBHqVGxmuJgQskCHp2DAkHWPDNbKlv+Q4mOD2gfkUNHUMP8sTnwORhsIR3fQjQ== dependencies: eventemitter3 "^4.0.0" @@ -1372,10 +1372,10 @@ dependencies: "@solana/wallet-adapter-base" "^0.9.16" -"@solana/web3.js@^1.54.1": - version "1.60.0" - resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.60.0.tgz#279dd95ab60d24c32dec5337b37db0d82e854bdd" - integrity sha512-gXwUPOruR786Mbce4n5cM2JA00UvRLuoUAQ5Me/XvY49Tqb8u4umifPY/rzWigJxs3XDCN2i2OT1avYjoePLMw== +"@solana/web3.js@^1.58.0": + version "1.63.0" + resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.63.0.tgz#2e247d89785bd79c994bbc79040f0d146ee117a5" + integrity sha512-qmDmfLPDjzhTAfN3jbtVI8YaIIIDN9q4p6gCiIhWwzKs8299rq8B+tkmCgiU6tAtIm3uqHl3wduhJMKmqdToBA== dependencies: "@babel/runtime" "^7.12.5" "@noble/ed25519" "^1.7.0" diff --git a/examples/example-web-app/package.json b/examples/example-web-app/package.json index 49a0e058c..88f688256 100644 --- a/examples/example-web-app/package.json +++ b/examples/example-web-app/package.json @@ -22,10 +22,9 @@ "@solana-mobile/mobile-wallet-adapter-protocol": "link:../../js/packages/mobile-wallet-adapter-protocol", "@solana-mobile/mobile-wallet-adapter-protocol-web3js": "link:../../js/packages/mobile-wallet-adapter-protocol-web3js", "@solana-mobile/wallet-adapter-mobile": "link:../../js/packages/wallet-adapter-mobile", - "@solana/wallet-adapter-base": "^0.9.8", + "@solana/wallet-adapter-base": "^0.9.17", "@solana/wallet-adapter-react": "^0.15.7", - "@solana/wallet-adapter-react-ui": "^0.9.7", - "@solana/web3.js": "^1.54.1", + "@solana/web3.js": "^1.58.0", "next": "^12.1.6", "notistack": "^2.0.5", "react": "^18.0.0", diff --git a/examples/example-web-app/yarn.lock b/examples/example-web-app/yarn.lock index 3fd9ca8d0..b16d443a5 100644 --- a/examples/example-web-app/yarn.lock +++ b/examples/example-web-app/yarn.lock @@ -158,27 +158,6 @@ resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.2.5.tgz#8eed982e2ee6f7f4e44c253e12962980791efd46" integrity sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA== -"@ethersproject/bytes@^5.6.1": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.6.1.tgz#24f916e411f82a8a60412344bf4a813b917eefe7" - integrity sha512-NwQt7cKn5+ZE4uDn+X5RAXLp46E1chXoaMmrxAyA0rblpxz8t58lVkrHXoRIn0lz1joQElQ8410GqhTqMOwc6g== - dependencies: - "@ethersproject/logger" "^5.6.0" - -"@ethersproject/logger@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.6.0.tgz#d7db1bfcc22fd2e4ab574cba0bb6ad779a9a3e7a" - integrity sha512-BiBWllUROH9w+P21RzoxJKzqoqpkyM1pRnEKG69bulE9TSQD8SAIvTQqIMZmmCO8pUNkgLP1wndX1gKghSpBmg== - -"@ethersproject/sha2@^5.5.0": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/sha2/-/sha2-5.6.1.tgz#211f14d3f5da5301c8972a8827770b6fd3e51656" - integrity sha512-5K2GyqcW7G4Yo3uenHegbXRPDgARpWUiXc6RiF7b6i/HXUoWlb7uCARh7BAHg7/qT/Q5ydofNwiZcim9qpjB6g== - dependencies: - "@ethersproject/bytes" "^5.6.1" - "@ethersproject/logger" "^5.6.0" - hash.js "1.1.7" - "@mui/base@5.0.0-alpha.90": version "5.0.0-alpha.90" resolved "https://registry.yarnpkg.com/@mui/base/-/base-5.0.0-alpha.90.tgz#73700ba74e5c75096ee5d0bfe3ba4a3b3b81beef" @@ -381,7 +360,7 @@ resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-4.6.0.tgz#3c7c9c46e678feefe7a2e5bb609d3dbd665ffb3f" integrity sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw== -"@solana-mobile/mobile-wallet-adapter-protocol-web3js@^0.9.0": +"@solana-mobile/mobile-wallet-adapter-protocol-web3js@^0.9.1": version "0.0.0" uid "" @@ -389,7 +368,7 @@ version "0.0.0" uid "" -"@solana-mobile/mobile-wallet-adapter-protocol@^0.9.0": +"@solana-mobile/mobile-wallet-adapter-protocol@^0.9.1": version "0.0.0" uid "" @@ -408,55 +387,31 @@ dependencies: buffer "~6.0.3" -"@solana/wallet-adapter-base@^0.9.8", "@solana/wallet-adapter-base@^0.9.9": +"@solana/wallet-adapter-base@^0.9.17": + version "0.9.17" + resolved "https://registry.yarnpkg.com/@solana/wallet-adapter-base/-/wallet-adapter-base-0.9.17.tgz#b388fea0ec6da40e23342068a4cfa9be65dc8f63" + integrity sha512-YEkO04QndfRXb6psznMuRsw2YBHqVGxmuJgQskCHp2DAkHWPDNbKlv+Q4mOD2gfkUNHUMP8sTnwORhsIR3fQjQ== + dependencies: + eventemitter3 "^4.0.0" + +"@solana/wallet-adapter-base@^0.9.9": version "0.9.9" resolved "https://registry.yarnpkg.com/@solana/wallet-adapter-base/-/wallet-adapter-base-0.9.9.tgz#110f99bc9eee18af2625fd6170264e4363e25ffd" integrity sha512-Z0zB+36JWRytE2OzMiB2DACRyVwiUdEg2Xy1nPR0rESCTXKI8wQGTb4g6ELjmTTU7+elKqsPE+fhFsJykn76pQ== dependencies: eventemitter3 "^4.0.0" -"@solana/wallet-adapter-react-ui@^0.9.7": - version "0.9.10" - resolved "https://registry.yarnpkg.com/@solana/wallet-adapter-react-ui/-/wallet-adapter-react-ui-0.9.10.tgz#75d030b6930b3bff236b4128d7661355859a7c75" - integrity sha512-KfAuITJCJTBDz/iay18D1wSx4fc+znI1NXw49wur5goU71g+SytYnPfF0LQsUfzDJ6w0ij1H8z38aQJIKe2quQ== - dependencies: - "@solana/wallet-adapter-base" "^0.9.9" - "@solana/wallet-adapter-react" "^0.15.8" - -"@solana/wallet-adapter-react@^0.15.7", "@solana/wallet-adapter-react@^0.15.8": +"@solana/wallet-adapter-react@^0.15.7": version "0.15.8" resolved "https://registry.yarnpkg.com/@solana/wallet-adapter-react/-/wallet-adapter-react-0.15.8.tgz#88b78446bbadbba50ea05b3f1e38d4ec5a5898dc" integrity sha512-/0Kbnt/HqdlfGMaI7/BXpQYsfBmfTPPLkR6xBcVITcPa6WKytkap/d4gwmY3skum/naoCP8Bof9uXynZNO8/SA== dependencies: "@solana/wallet-adapter-base" "^0.9.9" -"@solana/web3.js@^1.20.0": - version "1.48.0" - resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.48.0.tgz#331281b2d80640431fb3b6fdc6b704ec325917aa" - integrity sha512-Gb6XvdhGjGI7CdAXLmlMIEvEYvrwqc78JOtwCsSrTqzz7Ek/BhJpZ/Cv89gxRDrWxf6kHegAfaN2FxwuYMmDZQ== - dependencies: - "@babel/runtime" "^7.12.5" - "@ethersproject/sha2" "^5.5.0" - "@solana/buffer-layout" "^4.0.0" - bigint-buffer "^1.1.5" - bn.js "^5.0.0" - borsh "^0.7.0" - bs58 "^4.0.1" - buffer "6.0.1" - fast-stable-stringify "^1.0.0" - jayson "^3.4.4" - js-sha3 "^0.8.0" - node-fetch "2" - react-native-url-polyfill "^1.3.0" - rpc-websockets "^7.5.0" - secp256k1 "^4.0.2" - superstruct "^0.14.2" - tweetnacl "^1.0.0" - -"@solana/web3.js@^1.54.1": - version "1.54.1" - resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.54.1.tgz#c39ffa598beaa6d761ab55c78263d874f4441e14" - integrity sha512-/PViPDGxF6oZZidcILndlm0MdbuzBouiQcqxrAfiBZ4lHMntLE4U75KhC+205EkVnkgCC4/prkjKVeSnbkfzrw== +"@solana/web3.js@^1.58.0": + version "1.63.0" + resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.63.0.tgz#2e247d89785bd79c994bbc79040f0d146ee117a5" + integrity sha512-qmDmfLPDjzhTAfN3jbtVI8YaIIIDN9q4p6gCiIhWwzKs8299rq8B+tkmCgiU6tAtIm3uqHl3wduhJMKmqdToBA== dependencies: "@babel/runtime" "^7.12.5" "@noble/ed25519" "^1.7.0" @@ -470,7 +425,6 @@ buffer "6.0.1" fast-stable-stringify "^1.0.0" jayson "^3.4.4" - js-sha3 "^0.8.0" node-fetch "2" rpc-websockets "^7.5.0" superstruct "^0.14.2" @@ -681,11 +635,6 @@ bindings@^1.3.0: dependencies: file-uri-to-path "1.0.0" -bn.js@^4.11.9: - version "4.12.0" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" - integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== - bn.js@^5.0.0, bn.js@^5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" @@ -708,11 +657,6 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" -brorand@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" - integrity sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w== - bs58@^4.0.0, bs58@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" @@ -740,14 +684,6 @@ buffer@6.0.1: base64-js "^1.3.1" ieee754 "^1.2.1" -buffer@^5.4.3: - version "5.7.1" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" - integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== - dependencies: - base64-js "^1.3.1" - ieee754 "^1.1.13" - buffer@~6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" @@ -897,19 +833,6 @@ dom-helpers@^5.0.1: "@babel/runtime" "^7.8.7" csstype "^3.0.2" -elliptic@^6.5.4: - version "6.5.4" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" - integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== - dependencies: - bn.js "^4.11.9" - brorand "^1.1.0" - hash.js "^1.0.0" - hmac-drbg "^1.0.1" - inherits "^2.0.4" - minimalistic-assert "^1.0.1" - minimalistic-crypto-utils "^1.0.1" - end-of-stream@^1.1.0: version "1.4.4" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" @@ -1052,23 +975,6 @@ has@^1.0.3: dependencies: function-bind "^1.1.1" -hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3: - version "1.1.7" - resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" - integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== - dependencies: - inherits "^2.0.3" - minimalistic-assert "^1.0.1" - -hmac-drbg@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" - integrity sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg== - dependencies: - hash.js "^1.0.3" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.1" - hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.1: version "3.3.2" resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45" @@ -1094,7 +1000,7 @@ http2-wrapper@^1.0.0-beta.5.2: quick-lru "^5.1.1" resolve-alpn "^1.0.0" -ieee754@^1.1.13, ieee754@^1.2.1: +ieee754@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== @@ -1115,7 +1021,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@^2.0.3, inherits@^2.0.4: +inherits@2: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -1173,11 +1079,6 @@ js-base64@^3.7.2: resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-3.7.2.tgz#816d11d81a8aff241603d19ce5761e13e41d7745" integrity sha512-NnRs6dsyqUXejqk/yv2aiXlAvOs56sLkX6nUdeaNezI5LFFLlsZjOThmwnrcwh5ZZRwZlCMnVAY3CvhIhoVEKQ== -js-sha3@^0.8.0: - version "0.8.0" - resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" - integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== - "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -1255,16 +1156,6 @@ mimic-response@^3.1.0: resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9" integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ== -minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" - integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== - -minimalistic-crypto-utils@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" - integrity sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg== - minimatch@^3.1.1: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" @@ -1327,11 +1218,6 @@ ngrok@^4.3.1: optionalDependencies: hpagent "^0.1.2" -node-addon-api@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-2.0.2.tgz#432cfa82962ce494b132e9d72a15b29f71ff5d32" - integrity sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA== - node-fetch@2: version "2.6.7" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" @@ -1339,7 +1225,7 @@ node-fetch@2: dependencies: whatwg-url "^5.0.0" -node-gyp-build@^4.2.0, node-gyp-build@^4.3.0: +node-gyp-build@^4.3.0: version "4.5.0" resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.5.0.tgz#7a64eefa0b21112f89f58379da128ac177f20e40" integrity sha512-2iGbaQBV+ITgCz76ZEjmhUKAKVf7xfY1sRl4UiKQspfZMH2h06SyhNsnSVy50cwkFQDGLyif6m/6uFXHkOZ6rg== @@ -1442,11 +1328,6 @@ pump@^3.0.0: end-of-stream "^1.1.0" once "^1.3.1" -punycode@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" - integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== - quick-lru@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-5.1.1.tgz#366493e6b3e42a3a6885e2e99d18f80fb7a8c932" @@ -1470,13 +1351,6 @@ react-is@^18.2.0: resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== -react-native-url-polyfill@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/react-native-url-polyfill/-/react-native-url-polyfill-1.3.0.tgz#c1763de0f2a8c22cc3e959b654c8790622b6ef6a" - integrity sha512-w9JfSkvpqqlix9UjDvJjm1EjSt652zVQ6iwCIj1cVVkwXf4jQhQgTNXY6EVTwuAmUjg6BC6k9RHCBynoLFo3IQ== - dependencies: - whatwg-url-without-unicode "8.0.0-3" - react-transition-group@^4.4.2: version "4.4.2" resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-4.4.2.tgz#8b59a56f09ced7b55cbd53c36768b922890d5470" @@ -1562,15 +1436,6 @@ scheduler@^0.23.0: dependencies: loose-envify "^1.1.0" -secp256k1@^4.0.2: - version "4.0.3" - resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-4.0.3.tgz#c4559ecd1b8d3c1827ed2d1b94190d69ce267303" - integrity sha512-NLZVf+ROMxwtEj3Xa562qgv2BK5e2WNmXPiOdVIPLgs6lyTzMvBq0aWTYMI5XCP9jZMVKOcqZLw/Wc4vDkuxhA== - dependencies: - elliptic "^6.5.4" - node-addon-api "^2.0.0" - node-gyp-build "^4.2.0" - shelljs@^0.8.5: version "0.8.5" resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.5.tgz#de055408d8361bed66c669d2f000538ced8ee20c" @@ -1655,11 +1520,6 @@ tslib@^2.4.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3" integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== -tweetnacl@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596" - integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw== - typescript@^4.7.4: version "4.7.4" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235" @@ -1687,20 +1547,6 @@ webidl-conversions@^3.0.0: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== -webidl-conversions@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-5.0.0.tgz#ae59c8a00b121543a2acc65c0434f57b0fc11aff" - integrity sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA== - -whatwg-url-without-unicode@8.0.0-3: - version "8.0.0-3" - resolved "https://registry.yarnpkg.com/whatwg-url-without-unicode/-/whatwg-url-without-unicode-8.0.0-3.tgz#ab6df4bf6caaa6c85a59f6e82c026151d4bb376b" - integrity sha512-HoKuzZrUlgpz35YO27XgD28uh/WJH4B0+3ttFqRo//lmq+9T/mIOJ6kqmINI9HpUpz1imRC/nR/lxKpJiv0uig== - dependencies: - buffer "^5.4.3" - punycode "^2.1.1" - webidl-conversions "^5.0.0" - whatwg-url@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" diff --git a/js/packages/mobile-wallet-adapter-protocol-web3js/package.json b/js/packages/mobile-wallet-adapter-protocol-web3js/package.json index a5535f70b..02a6495d7 100644 --- a/js/packages/mobile-wallet-adapter-protocol-web3js/package.json +++ b/js/packages/mobile-wallet-adapter-protocol-web3js/package.json @@ -37,7 +37,7 @@ "prepublishOnly": "agadoo" }, "peerDependencies": { - "@solana/web3.js": "^1.48.0" + "@solana/web3.js": "^1.58.0" }, "dependencies": { "@solana-mobile/mobile-wallet-adapter-protocol": "^0.9.1", diff --git a/js/packages/mobile-wallet-adapter-protocol-web3js/src/transact.ts b/js/packages/mobile-wallet-adapter-protocol-web3js/src/transact.ts index 614a5b561..871545c82 100644 --- a/js/packages/mobile-wallet-adapter-protocol-web3js/src/transact.ts +++ b/js/packages/mobile-wallet-adapter-protocol-web3js/src/transact.ts @@ -1,7 +1,14 @@ -import { Transaction, TransactionSignature } from '@solana/web3.js'; +import { + Transaction as LegacyTransaction, + Transaction, + TransactionSignature, + VersionedMessage, + VersionedTransaction, +} from '@solana/web3.js'; import { AuthorizeAPI, Base64EncodedAddress, + Base64EncodedTransaction, CloneAuthorizationAPI, DeauthorizeAPI, MobileWallet, @@ -14,14 +21,14 @@ import bs58 from 'bs58'; import { fromUint8Array, toUint8Array } from './base64Utils'; interface Web3SignAndSendTransactionsAPI { - signAndSendTransactions(params: { + signAndSendTransactions(params: { minContextSlot?: number; - transactions: Transaction[]; + transactions: T[]; }): Promise; } interface Web3SignTransactionsAPI { - signTransactions(params: { transactions: Transaction[] }): Promise; + signTransactions(params: { transactions: T[] }): Promise; } interface Web3SignMessagesAPI { @@ -37,6 +44,27 @@ export interface Web3MobileWallet Web3SignTransactionsAPI, Web3SignMessagesAPI {} +function getPayloadFromTransaction(transaction: LegacyTransaction | VersionedTransaction): Base64EncodedTransaction { + const serializedTransaction = + 'version' in transaction + ? transaction.serialize() + : transaction.serialize({ + requireAllSignatures: false, + verifySignatures: false, + }); + const payload = fromUint8Array(serializedTransaction); + return payload; +} + +function getTransactionFromWireMessage(byteArray: Uint8Array): Transaction | VersionedTransaction { + const version = VersionedMessage.deserializeMessageVersion(byteArray); + if (version === 'legacy') { + return Transaction.from(byteArray); + } else { + return VersionedTransaction.deserialize(byteArray); + } +} + export async function transact( callback: (wallet: Web3MobileWallet) => TReturn, config?: WalletAssociationConfig, @@ -52,15 +80,7 @@ export async function transact( transactions, ...rest }: Parameters[0]) { - const payloads = await Promise.all( - transactions.map(async (transaction) => { - const serializedTransaction = await transaction.serialize({ - requireAllSignatures: false, - verifySignatures: false, - }); - return serializedTransaction.toString('base64'); - }), - ); + const payloads = transactions.map(getPayloadFromTransaction); const { signatures: base64EncodedSignatures } = await wallet.signAndSendTransactions({ ...rest, ...(minContextSlot != null @@ -91,22 +111,14 @@ export async function transact( transactions, ...rest }: Parameters[0]) { - const serializedTransactions = transactions.map((transaction) => - transaction.serialize({ - requireAllSignatures: false, - verifySignatures: false, - }), - ); - const payloads = serializedTransactions.map((serializedTransaction) => - serializedTransaction.toString('base64'), - ); + const payloads = transactions.map(getPayloadFromTransaction); const { signed_payloads: base64EncodedCompiledTransactions } = await wallet.signTransactions({ ...rest, payloads, }); const compiledTransactions = base64EncodedCompiledTransactions.map(toUint8Array); - const signedTransactions = compiledTransactions.map(Transaction.from); + const signedTransactions = compiledTransactions.map(getTransactionFromWireMessage); return signedTransactions; } as Web3MobileWallet[TMethodName]; break; diff --git a/js/packages/mobile-wallet-adapter-protocol/src/types.ts b/js/packages/mobile-wallet-adapter-protocol/src/types.ts index bd82167f3..70dcd6446 100644 --- a/js/packages/mobile-wallet-adapter-protocol/src/types.ts +++ b/js/packages/mobile-wallet-adapter-protocol/src/types.ts @@ -44,7 +44,7 @@ type Base64EncodedSignedMessage = string; type Base64EncodedSignedTransaction = string; -type Base64EncodedTransaction = string; +export type Base64EncodedTransaction = string; export type Cluster = 'devnet' | 'testnet' | 'mainnet-beta'; diff --git a/js/packages/wallet-adapter-mobile/package.json b/js/packages/wallet-adapter-mobile/package.json index 30c6ed8d5..49813971f 100644 --- a/js/packages/wallet-adapter-mobile/package.json +++ b/js/packages/wallet-adapter-mobile/package.json @@ -37,16 +37,16 @@ "prepublishOnly": "agadoo" }, "peerDependencies": { - "@solana/web3.js": "^1.36.0" + "@solana/web3.js": "^1.58.0" }, "dependencies": { "@react-native-async-storage/async-storage": "^1.17.7", "@solana-mobile/mobile-wallet-adapter-protocol-web3js": "^0.9.1", - "@solana/wallet-adapter-base": "^0.9.8", - "@solana/web3.js": "^1.20.0", + "@solana/wallet-adapter-base": "^0.9.17", "js-base64": "^3.7.2" }, "devDependencies": { + "@solana/web3.js": "^1.58.0", "agadoo": "^2.0.0", "cross-env": "^7.0.3", "shx": "^0.3.4" diff --git a/js/packages/wallet-adapter-mobile/src/adapter.ts b/js/packages/wallet-adapter-mobile/src/adapter.ts index 44a9581be..d18359689 100644 --- a/js/packages/wallet-adapter-mobile/src/adapter.ts +++ b/js/packages/wallet-adapter-mobile/src/adapter.ts @@ -19,7 +19,15 @@ import { WalletSignMessageError, WalletSignTransactionError, } from '@solana/wallet-adapter-base'; -import { Connection, PublicKey, SendOptions, Transaction, TransactionSignature } from '@solana/web3.js'; +import { + Connection, + PublicKey, + SendOptions, + Transaction as LegacyTransaction, + TransactionSignature, + TransactionVersion, + VersionedTransaction, +} from '@solana/web3.js'; import { toUint8Array } from './base64Utils'; import getIsSupported from './getIsSupported'; import { Cluster } from '@solana-mobile/mobile-wallet-adapter-protocol'; @@ -44,6 +52,10 @@ function getPublicKeyFromAddress(address: Base64EncodedAddress): PublicKey { } export class SolanaMobileWalletAdapter extends BaseMessageSignerWalletAdapter { + readonly supportedTransactionVersions: Set = new Set( + // FIXME(#244): We can't actually know what versions are supported until we know which wallet we're talking to. + ['legacy', 0], + ); name = SolanaMobileWalletAdapterWalletName; url = 'https://solanamobile.com'; icon = @@ -217,7 +229,9 @@ export class SolanaMobileWalletAdapter extends BaseMessageSignerWalletAdapter { }; } - private async performSignTransactions(transactions: Transaction[]): Promise { + private async performSignTransactions( + transactions: T[], + ): Promise { const { authToken } = this.assertIsAuthorized(); try { return await this.transact(async (wallet) => { @@ -232,8 +246,8 @@ export class SolanaMobileWalletAdapter extends BaseMessageSignerWalletAdapter { } } - async sendTransaction( - transaction: Transaction, + async sendTransaction( + transaction: T, connection: Connection, options?: SendOptions, ): Promise { @@ -242,51 +256,62 @@ export class SolanaMobileWalletAdapter extends BaseMessageSignerWalletAdapter { const minContextSlot = options?.minContextSlot; try { return await this.transact(async (wallet) => { - let targetCommitment: Finality; - switch (connection.commitment) { - case 'confirmed': - case 'finalized': - case 'processed': - targetCommitment = connection.commitment; - break; - default: - targetCommitment = 'finalized'; - } - let targetPreflightCommitment: Finality; - switch (options?.preflightCommitment) { - case 'confirmed': - case 'finalized': - case 'processed': - targetPreflightCommitment = options.preflightCommitment; - break; - case undefined: - targetPreflightCommitment = targetCommitment; - default: - targetPreflightCommitment = 'finalized'; - } await Promise.all([ this.performReauthorization(wallet, authToken), - (async () => { - if (transaction.recentBlockhash == null) { - const preflightCommitmentScore = - targetPreflightCommitment === 'finalized' - ? 2 - : targetPreflightCommitment === 'confirmed' - ? 1 - : 0; - const targetCommitmentScore = - targetCommitment === 'finalized' ? 2 : targetCommitment === 'confirmed' ? 1 : 0; - const { blockhash } = await connection.getLatestBlockhash({ - commitment: - preflightCommitmentScore < targetCommitmentScore - ? targetPreflightCommitment - : targetCommitment, - }); - transaction.recentBlockhash = blockhash; - } - })(), + 'version' in transaction + ? null + : /** + * Unlike versioned transactions, legacy `Transaction` objects + * may not have an associated `feePayer` or `recentBlockhash`. + * This code exists to patch them up in case they are missing. + */ + (async () => { + transaction.feePayer ||= this.publicKey ?? undefined; + if (transaction.recentBlockhash == null) { + let targetCommitment: Finality; + switch (connection.commitment) { + case 'confirmed': + case 'finalized': + case 'processed': + targetCommitment = connection.commitment; + break; + default: + targetCommitment = 'finalized'; + } + let targetPreflightCommitment: Finality; + switch (options?.preflightCommitment) { + case 'confirmed': + case 'finalized': + case 'processed': + targetPreflightCommitment = options.preflightCommitment; + break; + case undefined: + targetPreflightCommitment = targetCommitment; + default: + targetPreflightCommitment = 'finalized'; + } + const preflightCommitmentScore = + targetPreflightCommitment === 'finalized' + ? 2 + : targetPreflightCommitment === 'confirmed' + ? 1 + : 0; + const targetCommitmentScore = + targetCommitment === 'finalized' + ? 2 + : targetCommitment === 'confirmed' + ? 1 + : 0; + const { blockhash } = await connection.getLatestBlockhash({ + commitment: + preflightCommitmentScore < targetCommitmentScore + ? targetPreflightCommitment + : targetCommitment, + }); + transaction.recentBlockhash = blockhash; + } + })(), ]); - transaction.feePayer ||= this.publicKey ?? undefined; const signatures = await wallet.signAndSendTransactions({ minContextSlot, transactions: [transaction], @@ -299,14 +324,14 @@ export class SolanaMobileWalletAdapter extends BaseMessageSignerWalletAdapter { }); } - async signTransaction(transaction: Transaction): Promise { + async signTransaction(transaction: T): Promise { return await this.runWithGuard(async () => { const [signedTransaction] = await this.performSignTransactions([transaction]); return signedTransaction; }); } - async signAllTransactions(transactions: Transaction[]): Promise { + async signAllTransactions(transactions: T[]): Promise { return await this.runWithGuard(async () => { const signedTransactions = await this.performSignTransactions(transactions); return signedTransactions; diff --git a/js/yarn.lock b/js/yarn.lock index 40b56025f..326288d88 100644 --- a/js/yarn.lock +++ b/js/yarn.lock @@ -45,27 +45,6 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@ethersproject/bytes@^5.6.1": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.6.1.tgz#24f916e411f82a8a60412344bf4a813b917eefe7" - integrity sha512-NwQt7cKn5+ZE4uDn+X5RAXLp46E1chXoaMmrxAyA0rblpxz8t58lVkrHXoRIn0lz1joQElQ8410GqhTqMOwc6g== - dependencies: - "@ethersproject/logger" "^5.6.0" - -"@ethersproject/logger@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.6.0.tgz#d7db1bfcc22fd2e4ab574cba0bb6ad779a9a3e7a" - integrity sha512-BiBWllUROH9w+P21RzoxJKzqoqpkyM1pRnEKG69bulE9TSQD8SAIvTQqIMZmmCO8pUNkgLP1wndX1gKghSpBmg== - -"@ethersproject/sha2@^5.5.0": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/sha2/-/sha2-5.6.1.tgz#211f14d3f5da5301c8972a8827770b6fd3e51656" - integrity sha512-5K2GyqcW7G4Yo3uenHegbXRPDgARpWUiXc6RiF7b6i/HXUoWlb7uCARh7BAHg7/qT/Q5ydofNwiZcim9qpjB6g== - dependencies: - "@ethersproject/bytes" "^5.6.1" - "@ethersproject/logger" "^5.6.0" - hash.js "1.1.7" - "@gar/promisify@^1.0.1", "@gar/promisify@^1.1.3": version "1.1.3" resolved "https://registry.yarnpkg.com/@gar/promisify/-/promisify-1.1.3.tgz#555193ab2e3bb3b6adc3d551c9c030d9e860daf6" @@ -786,6 +765,21 @@ resolved "https://registry.yarnpkg.com/@mdn/browser-compat-data/-/browser-compat-data-4.2.1.tgz#1fead437f3957ceebe2e8c3f46beccdb9bc575b8" integrity sha512-EWUguj2kd7ldmrF9F+vI5hUOralPd+sdsUnYbRy33vZTuZkduC1shE9TtEMEjAQwyfyMb4ole5KtjF8MsnQOlA== +"@noble/ed25519@^1.7.0": + version "1.7.1" + resolved "https://registry.yarnpkg.com/@noble/ed25519/-/ed25519-1.7.1.tgz#6899660f6fbb97798a6fbd227227c4589a454724" + integrity sha512-Rk4SkJFaXZiznFyC/t77Q0NKS4FL7TLJJsVG2V2oiEq3kJVeTdxysEe/yRWSpnWMe808XRDJ+VFh5pt/FN5plw== + +"@noble/hashes@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.1.2.tgz#e9e035b9b166ca0af657a7848eb2718f0f22f183" + integrity sha512-KYRCASVTv6aeUi1tsF8/vpyR7zpfs3FUzy2Jqm+MU+LmUKhQ0y2FpfwqkCcxSg2ua4GALJd8k2R76WxwZGbQpA== + +"@noble/secp256k1@^1.6.3": + version "1.7.0" + resolved "https://registry.yarnpkg.com/@noble/secp256k1/-/secp256k1-1.7.0.tgz#d15357f7c227e751d90aa06b05a0e5cf993ba8c1" + integrity sha512-kbacwGSsH/CTout0ZnZWxnW1B+jH/7r/WAAKLBtrRJ/+CUH7lgmQzl3GTrQua3SGKWNSDsS6lmjnDpIJ5Dxyaw== + "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" @@ -1149,20 +1143,22 @@ dependencies: buffer "~6.0.3" -"@solana/wallet-adapter-base@^0.9.8": - version "0.9.8" - resolved "https://registry.yarnpkg.com/@solana/wallet-adapter-base/-/wallet-adapter-base-0.9.8.tgz#7469d878d481a0004c29276f3f4d7fa09e3e7293" - integrity sha512-SYbSGQuWih2N5zOtLO21cbEFt8G4PFWMhE/9qlAXjsXRjdGz+pU6NkNMzspvdAizCLUPuB9biKFjX82W0SZm3w== +"@solana/wallet-adapter-base@^0.9.17": + version "0.9.17" + resolved "https://registry.yarnpkg.com/@solana/wallet-adapter-base/-/wallet-adapter-base-0.9.17.tgz#b388fea0ec6da40e23342068a4cfa9be65dc8f63" + integrity sha512-YEkO04QndfRXb6psznMuRsw2YBHqVGxmuJgQskCHp2DAkHWPDNbKlv+Q4mOD2gfkUNHUMP8sTnwORhsIR3fQjQ== dependencies: eventemitter3 "^4.0.0" -"@solana/web3.js@^1.20.0": - version "1.47.3" - resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.47.3.tgz#ec13f2cf4f9f54cc4fbd26d20be1e026c6e2279c" - integrity sha512-TQJulaN/+b0xXq5EhQAYFwVyOORxSyVJn1EiXupClZm8DY7f9EeUG6vl0FzSAgwEAwXKsgK3sVs/3px2e7H7dQ== +"@solana/web3.js@^1.58.0": + version "1.63.0" + resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.63.0.tgz#2e247d89785bd79c994bbc79040f0d146ee117a5" + integrity sha512-qmDmfLPDjzhTAfN3jbtVI8YaIIIDN9q4p6gCiIhWwzKs8299rq8B+tkmCgiU6tAtIm3uqHl3wduhJMKmqdToBA== dependencies: "@babel/runtime" "^7.12.5" - "@ethersproject/sha2" "^5.5.0" + "@noble/ed25519" "^1.7.0" + "@noble/hashes" "^1.1.2" + "@noble/secp256k1" "^1.6.3" "@solana/buffer-layout" "^4.0.0" bigint-buffer "^1.1.5" bn.js "^5.0.0" @@ -1171,12 +1167,9 @@ buffer "6.0.1" fast-stable-stringify "^1.0.0" jayson "^3.4.4" - js-sha3 "^0.8.0" node-fetch "2" rpc-websockets "^7.5.0" - secp256k1 "^4.0.2" superstruct "^0.14.2" - tweetnacl "^1.0.0" "@tootallnate/once@1": version "1.1.2" @@ -1656,11 +1649,6 @@ bindings@^1.3.0: dependencies: file-uri-to-path "1.0.0" -bn.js@^4.11.9: - version "4.12.0" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" - integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== - bn.js@^5.0.0, bn.js@^5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" @@ -1697,11 +1685,6 @@ braces@^3.0.2: dependencies: fill-range "^7.0.1" -brorand@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" - integrity sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w== - browserslist-generator@^1.0.66: version "1.0.66" resolved "https://registry.yarnpkg.com/browserslist-generator/-/browserslist-generator-1.0.66.tgz#14f3f2cbf09e9a82e7c53a62f8cc18ce6c35eca3" @@ -2343,19 +2326,6 @@ electron-to-chromium@^1.4.172, electron-to-chromium@^1.4.84: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.185.tgz#3432d7944f1c5fe20664bb45d9cced2151405ce2" integrity sha512-9kV/isoOGpKkBt04yYNaSWIBn3187Q5VZRtoReq8oz5NY/A4XmU6cAoqgQlDp7kKJCZMRjWZ8nsQyxfpFHvfyw== -elliptic@^6.5.4: - version "6.5.4" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" - integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== - dependencies: - bn.js "^4.11.9" - brorand "^1.1.0" - hash.js "^1.0.0" - hmac-drbg "^1.0.1" - inherits "^2.0.4" - minimalistic-assert "^1.0.1" - minimalistic-crypto-utils "^1.0.1" - emoji-regex@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" @@ -3037,28 +3007,11 @@ has@^1.0.3: dependencies: function-bind "^1.1.1" -hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3: - version "1.1.7" - resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" - integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== - dependencies: - inherits "^2.0.3" - minimalistic-assert "^1.0.1" - helpertypes@^0.0.18: version "0.0.18" resolved "https://registry.yarnpkg.com/helpertypes/-/helpertypes-0.0.18.tgz#fd2bf5d3351cc7d80f7876732361d3adba63e5b4" integrity sha512-XRhfbSEmR+poXUC5/8AbmYNJb2riOT6qPzjGJZr0S9YedHiaY+/tzPYzWMUclYMEdCYo/1l8PDYrQFCj02v97w== -hmac-drbg@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" - integrity sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg== - dependencies: - hash.js "^1.0.3" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.1" - hosted-git-info@^2.1.4: version "2.8.9" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" @@ -3198,7 +3151,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3: +inherits@2, inherits@^2.0.3, inherits@~2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -3537,11 +3490,6 @@ js-base64@^3.7.2: resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-3.7.2.tgz#816d11d81a8aff241603d19ce5761e13e41d7745" integrity sha512-NnRs6dsyqUXejqk/yv2aiXlAvOs56sLkX6nUdeaNezI5LFFLlsZjOThmwnrcwh5ZZRwZlCMnVAY3CvhIhoVEKQ== -js-sha3@^0.8.0: - version "0.8.0" - resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" - integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== - js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -3915,16 +3863,6 @@ min-indent@^1.0.0: resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== -minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" - integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== - -minimalistic-crypto-utils@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" - integrity sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg== - minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" @@ -4091,11 +4029,6 @@ neo-async@^2.6.0: resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== -node-addon-api@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-2.0.2.tgz#432cfa82962ce494b132e9d72a15b29f71ff5d32" - integrity sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA== - node-fetch@2, node-fetch@^2.6.1, node-fetch@^2.6.7: version "2.6.7" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" @@ -4103,7 +4036,7 @@ node-fetch@2, node-fetch@^2.6.1, node-fetch@^2.6.7: dependencies: whatwg-url "^5.0.0" -node-gyp-build@^4.2.0, node-gyp-build@^4.3.0: +node-gyp-build@^4.3.0: version "4.5.0" resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.5.0.tgz#7a64eefa0b21112f89f58379da128ac177f20e40" integrity sha512-2iGbaQBV+ITgCz76ZEjmhUKAKVf7xfY1sRl4UiKQspfZMH2h06SyhNsnSVy50cwkFQDGLyif6m/6uFXHkOZ6rg== @@ -5011,15 +4944,6 @@ safe-buffer@~5.1.0, safe-buffer@~5.1.1: resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== -secp256k1@^4.0.2: - version "4.0.3" - resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-4.0.3.tgz#c4559ecd1b8d3c1827ed2d1b94190d69ce267303" - integrity sha512-NLZVf+ROMxwtEj3Xa562qgv2BK5e2WNmXPiOdVIPLgs6lyTzMvBq0aWTYMI5XCP9jZMVKOcqZLw/Wc4vDkuxhA== - dependencies: - elliptic "^6.5.4" - node-addon-api "^2.0.0" - node-gyp-build "^4.2.0" - "semver@2 || 3 || 4 || 5", semver@^5.6.0: version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" @@ -5435,11 +5359,6 @@ tsutils@^3.21.0: dependencies: tslib "^1.8.1" -tweetnacl@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596" - integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw== - type-check@^0.4.0, type-check@~0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1"