From 0b956a90f346f15ef41a4a31f6ff8c84d3375cc2 Mon Sep 17 00:00:00 2001 From: Bhavi Dhingra Date: Fri, 2 Aug 2024 01:18:23 +0530 Subject: [PATCH] feat(sui): non-bitgo recovery for hot wallets WIN-3274 --- package-lock.json | 356 ++++++++++++++++++++++++++++++++++++++++++++++ package.json | 1 + 2 files changed, 357 insertions(+) diff --git a/package-lock.json b/package-lock.json index 73e5e077..8b90f2d3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "version": "0.0.0-placeholder-version", "license": "Apache-2.0", "dependencies": { + "@bitgo-beta/sdk-coin-sui": "^1.4.1-alpha.183", "@bitgo/abstract-cosmos": "10.1.1", "@bitgo/abstract-utxo": "8.12.1", "@bitgo/sdk-api": "1.52.0", @@ -2198,6 +2199,361 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, + "node_modules/@bitgo-beta/blake2b": { + "version": "3.2.1-alpha.184", + "resolved": "https://registry.npmjs.org/@bitgo-beta/blake2b/-/blake2b-3.2.1-alpha.184.tgz", + "integrity": "sha512-pOK6akvfMy+Xs7f3iQrK+N5gDTW3Ve08BwZocIGzS5hXQWv1LRdBC/8SH86XmCH56fK/x9vC9AlZSVGE1CbiXg==", + "dependencies": { + "@bitgo-beta/blake2b-wasm": "3.2.1-alpha.185", + "nanoassert": "^2.0.0" + } + }, + "node_modules/@bitgo-beta/blake2b-wasm": { + "version": "3.2.1-alpha.185", + "resolved": "https://registry.npmjs.org/@bitgo-beta/blake2b-wasm/-/blake2b-wasm-3.2.1-alpha.185.tgz", + "integrity": "sha512-ooo+ECE7euK8GaxOHmmVHVTUmzq9/KBqBFfiFe8fIej83lgmjxfr7SxTnVGRz+L9n2C4B9RH+qjm98km/0gfeA==", + "dependencies": { + "nanoassert": "^1.0.0" + } + }, + "node_modules/@bitgo-beta/blake2b-wasm/node_modules/nanoassert": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/nanoassert/-/nanoassert-1.1.0.tgz", + "integrity": "sha512-C40jQ3NzfkP53NsO8kEOFd79p4b9kDXQMwgiY1z8ZwrDZgUyom0AHwGegF4Dm99L+YoYhuaB0ceerUcXmqr1rQ==" + }, + "node_modules/@bitgo-beta/bls-dkg": { + "version": "1.3.1-alpha.185", + "resolved": "https://registry.npmjs.org/@bitgo-beta/bls-dkg/-/bls-dkg-1.3.1-alpha.185.tgz", + "integrity": "sha512-RBx4fXrd/79jQnZq9j36lX7H4xOR+ZC1PST2kyYSphl4XgUVF9+PlV+VoVowOm1f8E6t7iN5Y0QQitz73MFopg==", + "dependencies": { + "noble-bls12-381": "^0.7.2" + } + }, + "node_modules/@bitgo-beta/sdk-coin-sui": { + "version": "1.4.1-alpha.183", + "resolved": "https://registry.npmjs.org/@bitgo-beta/sdk-coin-sui/-/sdk-coin-sui-1.4.1-alpha.183.tgz", + "integrity": "sha512-/hGg/uJsoW2ht4h+4ITMKOeJXXOspC98/Mcg5ZZTxrlRNCvm6LC2XSEGitKXVf58kBxaky/zqHJpviOPqo7NIw==", + "dependencies": { + "@bitgo-beta/blake2b": "3.2.1-alpha.184", + "@bitgo-beta/sdk-core": "2.4.1-alpha.184", + "@bitgo-beta/sdk-lib-mpc": "8.2.1-alpha.139", + "@bitgo-beta/statics": "10.0.1-alpha.184", + "@mysten/bcs": "^0.7.0", + "bignumber.js": "^9.0.0", + "bs58": "^4.0.1", + "lodash": "^4.17.21", + "superagent": "3.8.2", + "superstruct": "^1.0.3", + "tweetnacl": "^1.0.3" + }, + "engines": { + "node": ">=18 <21" + } + }, + "node_modules/@bitgo-beta/sdk-coin-sui/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/@bitgo-beta/sdk-coin-sui/node_modules/form-data": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", + "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 0.12" + } + }, + "node_modules/@bitgo-beta/sdk-coin-sui/node_modules/formidable": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.2.6.tgz", + "integrity": "sha512-KcpbcpuLNOwrEjnbpMC0gS+X8ciDoZE1kkqzat4a8vrprf+s9pKNQ/QIwWfbfs4ltgmFl3MD177SNTkve3BwGQ==", + "deprecated": "Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau", + "funding": { + "url": "https://ko-fi.com/tunnckoCore/commissions" + } + }, + "node_modules/@bitgo-beta/sdk-coin-sui/node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" + }, + "node_modules/@bitgo-beta/sdk-coin-sui/node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@bitgo-beta/sdk-coin-sui/node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/@bitgo-beta/sdk-coin-sui/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "node_modules/@bitgo-beta/sdk-coin-sui/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/@bitgo-beta/sdk-coin-sui/node_modules/superagent": { + "version": "3.8.2", + "resolved": "https://registry.npmjs.org/superagent/-/superagent-3.8.2.tgz", + "integrity": "sha512-gVH4QfYHcY3P0f/BZzavLreHW3T1v7hG9B+hpMQotGQqurOvhv87GcMCd6LWySmBuf+BDR44TQd0aISjVHLeNQ==", + "deprecated": "Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net", + "dependencies": { + "component-emitter": "^1.2.0", + "cookiejar": "^2.1.0", + "debug": "^3.1.0", + "extend": "^3.0.0", + "form-data": "^2.3.1", + "formidable": "^1.1.1", + "methods": "^1.1.1", + "mime": "^1.4.1", + "qs": "^6.5.1", + "readable-stream": "^2.0.5" + }, + "engines": { + "node": ">= 4.0" + } + }, + "node_modules/@bitgo-beta/sdk-coin-sui/node_modules/superstruct": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/superstruct/-/superstruct-1.0.4.tgz", + "integrity": "sha512-7JpaAoX2NGyoFlI9NBh66BQXGONc+uE+MRS5i2iOBKuS4e+ccgMDjATgZldkah+33DakBxDHiss9kvUcGAO8UQ==", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@bitgo-beta/sdk-core": { + "version": "2.4.1-alpha.184", + "resolved": "https://registry.npmjs.org/@bitgo-beta/sdk-core/-/sdk-core-2.4.1-alpha.184.tgz", + "integrity": "sha512-otyAJZsjHdREtSEgngs7ONZUKuta5jCU5/c/ZBtKpXGjYqof0/1U3IpIxx3BH9eTByC2G5YFJKe80dxQziBLTQ==", + "dependencies": { + "@bitgo-beta/bls-dkg": "1.3.1-alpha.185", + "@bitgo-beta/sdk-lib-mpc": "8.2.1-alpha.139", + "@bitgo-beta/sjcl": "1.0.1-alpha.133", + "@bitgo-beta/statics": "10.0.1-alpha.184", + "@bitgo-beta/utxo-lib": "4.0.1-alpha.184", + "@bitgo/public-types": "2.33.4", + "@noble/secp256k1": "1.6.3", + "@stablelib/hex": "^1.0.0", + "@types/elliptic": "^6.4.12", + "@types/superagent": "4.1.15", + "bech32": "^2.0.0", + "big.js": "^3.1.3", + "bigint-crypto-utils": "3.1.4", + "bignumber.js": "^9.1.1", + "bitcoinjs-message": "npm:@bitgo-forks/bitcoinjs-message@1.0.0-master.2", + "bolt11": "^1.4.0", + "bs58": "^4.0.1", + "create-hmac": "^1.1.7", + "debug": "^3.1.0", + "elliptic": "^6.5.2", + "ethereumjs-util": "7.1.5", + "fp-ts": "^2.12.2", + "io-ts": "2.1.3", + "io-ts-types": "0.5.16", + "keccak": "3.0.3", + "libsodium-wrappers-sumo": "^0.7.9", + "lodash": "^4.17.15", + "noble-bls12-381": "0.7.2", + "openpgp": "5.10.1", + "paillier-bigint": "3.3.0", + "secp256k1": "5.0.0", + "strip-hex-prefix": "^1.0.0", + "superagent": "^9.0.1", + "tweetnacl": "^1.0.3", + "uuid": "^8.3.2" + } + }, + "node_modules/@bitgo-beta/sdk-core/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/@bitgo-beta/sdk-core/node_modules/keccak": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.3.tgz", + "integrity": "sha512-JZrLIAJWuZxKbCilMpNz5Vj7Vtb4scDG3dMXLOsbzBmQGyjwE61BbW7bJkfKKCShXiQZt3T6sBgALRtmd+nZaQ==", + "hasInstallScript": true, + "dependencies": { + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/@bitgo-beta/sdk-core/node_modules/node-addon-api": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", + "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==" + }, + "node_modules/@bitgo-beta/sdk-core/node_modules/secp256k1": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-5.0.0.tgz", + "integrity": "sha512-TKWX8xvoGHrxVdqbYeZM9w+izTF4b9z3NhSaDkdn81btvuh+ivbIMGT/zQvDtTFWhRlThpoz6LEYTr7n8A5GcA==", + "hasInstallScript": true, + "dependencies": { + "elliptic": "^6.5.4", + "node-addon-api": "^5.0.0", + "node-gyp-build": "^4.2.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@bitgo-beta/sdk-core/node_modules/secp256k1/node_modules/node-addon-api": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz", + "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==" + }, + "node_modules/@bitgo-beta/sdk-lib-mpc": { + "version": "8.2.1-alpha.139", + "resolved": "https://registry.npmjs.org/@bitgo-beta/sdk-lib-mpc/-/sdk-lib-mpc-8.2.1-alpha.139.tgz", + "integrity": "sha512-oleKlpQafeHBSYIhDpQmzzYKH+lK1DObTiH2uPbhulde8IwCD7g3UAH9Jz7owOXXvOHLS0i4wdmxL1TnfE0ARQ==", + "dependencies": { + "@noble/curves": "1.4.0", + "@silencelaboratories/dkls-wasm-ll-node": "1.1.2", + "@silencelaboratories/dkls-wasm-ll-web": "1.1.2", + "@types/superagent": "4.1.15", + "@wasmer/wasi": "^1.2.2", + "bigint-crypto-utils": "3.1.4", + "bigint-mod-arith": "3.1.2", + "cbor-x": "1.5.9", + "fp-ts": "2.16.2", + "io-ts": "2.1.3", + "libsodium-wrappers-sumo": "^0.7.9", + "openpgp": "5.10.1", + "paillier-bigint": "3.3.0", + "secp256k1": "5.0.0" + }, + "peerDependencies": { + "@silencelaboratories/dkls-wasm-ll-bundler": "1.1.2" + }, + "peerDependenciesMeta": { + "@silencelaboratories/dkls-wasm-ll-bundler": { + "optional": true + } + } + }, + "node_modules/@bitgo-beta/sdk-lib-mpc/node_modules/@noble/curves": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.0.tgz", + "integrity": "sha512-p+4cb332SFCrReJkCYe8Xzm0OWi4Jji5jVdIZRL/PmacmDkFNw6MrrV+gGpiPxLHbV+zKFRywUWbaseT+tZRXg==", + "dependencies": { + "@noble/hashes": "1.4.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@bitgo-beta/sdk-lib-mpc/node_modules/@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@bitgo-beta/sdk-lib-mpc/node_modules/fp-ts": { + "version": "2.16.2", + "resolved": "https://registry.npmjs.org/fp-ts/-/fp-ts-2.16.2.tgz", + "integrity": "sha512-CkqAjnIKFqvo3sCyoBTqgJvF+bHrSik584S9nhTjtBESLx26cbtVMR/T9a6ApChOcSDAaM3JydDmWDUn4EEXng==" + }, + "node_modules/@bitgo-beta/sdk-lib-mpc/node_modules/node-addon-api": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz", + "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==" + }, + "node_modules/@bitgo-beta/sdk-lib-mpc/node_modules/secp256k1": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-5.0.0.tgz", + "integrity": "sha512-TKWX8xvoGHrxVdqbYeZM9w+izTF4b9z3NhSaDkdn81btvuh+ivbIMGT/zQvDtTFWhRlThpoz6LEYTr7n8A5GcA==", + "hasInstallScript": true, + "dependencies": { + "elliptic": "^6.5.4", + "node-addon-api": "^5.0.0", + "node-gyp-build": "^4.2.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@bitgo-beta/sjcl": { + "version": "1.0.1-alpha.133", + "resolved": "https://registry.npmjs.org/@bitgo-beta/sjcl/-/sjcl-1.0.1-alpha.133.tgz", + "integrity": "sha512-gXwhJ6PtCEnFDudZV3krY41bZ63QumKRZv+Y290wnARbGI1vJLdCAcur118R87OCGa7Knf11mu2LLWHtkNbsig==" + }, + "node_modules/@bitgo-beta/statics": { + "version": "10.0.1-alpha.184", + "resolved": "https://registry.npmjs.org/@bitgo-beta/statics/-/statics-10.0.1-alpha.184.tgz", + "integrity": "sha512-cjkwVqK+evyBT7i82K6OpiDRUO+F/wEfbTex59gW7KWLFPsZVq8IFJUwni/yhXCVajlBbtnaDOsLyRdJaAykPA==" + }, + "node_modules/@bitgo-beta/utxo-lib": { + "version": "4.0.1-alpha.184", + "resolved": "https://registry.npmjs.org/@bitgo-beta/utxo-lib/-/utxo-lib-4.0.1-alpha.184.tgz", + "integrity": "sha512-8JcwH2/rXGV35ZKgAT4bXNahXbsQKXYtUj+kpZyqc5Jg4D+ZUKGnNvx7ymVqrw+8DHtbFr+LLK6jv79/zHnJ3g==", + "dependencies": { + "@bitgo-beta/blake2b": "3.2.1-alpha.184", + "@brandonblack/musig": "^0.0.1-alpha.0", + "@noble/secp256k1": "1.6.3", + "bech32": "^2.0.0", + "bip174": "npm:@bitgo-forks/bip174@3.1.0-master.4", + "bip32": "^3.0.1", + "bitcoin-ops": "^1.3.0", + "bitcoinjs-lib": "npm:@bitgo-forks/bitcoinjs-lib@7.1.0-master.9", + "bn.js": "^5.2.1", + "bs58check": "^2.1.2", + "cashaddress": "^1.1.0", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "ecpair": "npm:@bitgo/ecpair@2.1.0-rc.0", + "elliptic": "^6.5.2", + "fastpriorityqueue": "^0.7.1", + "typeforce": "^1.11.3", + "varuint-bitcoin": "^1.1.2" + }, + "engines": { + "node": ">=10.22.0 <21", + "npm": ">=3.10.10" + } + }, "node_modules/@bitgo-forks/avalanchejs": { "version": "4.1.0-alpha.1", "resolved": "https://registry.npmjs.org/@bitgo-forks/avalanchejs/-/avalanchejs-4.1.0-alpha.1.tgz", diff --git a/package.json b/package.json index 8f2a1a62..aa97d57a 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ } }, "dependencies": { + "@bitgo-beta/sdk-coin-sui": "^1.4.1-alpha.183", "@bitgo/abstract-cosmos": "10.1.1", "@bitgo/abstract-utxo": "8.12.1", "@bitgo/sdk-api": "1.52.0",