diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 67f7a09792..364a2a5ce2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -76,6 +76,7 @@ jobs: "examples/audio_and_video", "examples/audio_recorder", "examples/autoreload", + "examples/basic_bitcoin", "examples/bitcoin", "examples/bitcoinjs-lib", "examples/bitcore-lib", diff --git a/examples/basic_bitcoin/.bitcoin.conf b/examples/basic_bitcoin/.bitcoin.conf index d2cf90b26f..c84674df72 100644 --- a/examples/basic_bitcoin/.bitcoin.conf +++ b/examples/basic_bitcoin/.bitcoin.conf @@ -5,3 +5,6 @@ regtest=1 rpcuser=ic-btc-integration rpcpassword=QPQiNaph19FqUsCrBRN0FII7lyM26B51fAMeBQzCb-E= rpcauth=ic-btc-integration:cdf2741387f3a12438f69092f0fdad8e$62081498c98bee09a0dce2b30671123fa561932992ce377585e8e08bb0c11dfa + +# Enable indexing so we can look up transactions by their ids +txindex=1 diff --git a/examples/basic_bitcoin/.gitignore b/examples/basic_bitcoin/.gitignore index 8699a2441c..d85448bfd1 100644 --- a/examples/basic_bitcoin/.gitignore +++ b/examples/basic_bitcoin/.gitignore @@ -3,4 +3,3 @@ .dfx dfx_generated node_modules - diff --git a/examples/basic_bitcoin/README.md b/examples/basic_bitcoin/README.md index 46dbceedad..98f6cdd7c6 100644 --- a/examples/basic_bitcoin/README.md +++ b/examples/basic_bitcoin/README.md @@ -5,14 +5,14 @@ This is an implementation of the [basic_bitcoin example](https://github.com/dfin ## bitcoind ```bash -mkdir .bitcoin -mkdir .bitcoin/data - -curl https://bitcoincore.org/bin/bitcoin-core-23.0/bitcoin-23.0-x86_64-linux-gnu.tar.gz -o bitcoin.tar.gz - -tar xzf bitcoin.tar.gz --overwrite --strip-components=1 --directory=.bitcoin/ bitcoin-23.0/bin/ - -rm -rf bitcoin.tar.gz +mkdir -p .bitcoin/data + +# Check if bitcoind executable exists; if not, download and extract it +if [ ! -f ".bitcoin/bin/bitcoind" ]; then + curl -o bitcoin.tar.gz https://bitcoincore.org/bin/bitcoin-core-23.0/bitcoin-23.0-x86_64-linux-gnu.tar.gz + tar xzf bitcoin.tar.gz --overwrite --strip-components=1 --directory=.bitcoin/ bitcoin-23.0/bin/ + rm -rf bitcoin.tar.gz +fi ``` # Deployment @@ -28,13 +28,13 @@ rm -rf bitcoin.tar.gz ```bash # Do this in its own terminal -dfx start --clean --host 127.0.0.1:8000 --enable-bitcoin +dfx start --clean --host 127.0.0.1:8000 ``` ## basic_bitcion ```bash -dfx deploy --argument='(variant { Regtest })' +BITCOIN_NETWORK=regtest dfx deploy' ``` # Usage diff --git a/examples/basic_bitcoin/dfx.json b/examples/basic_bitcoin/dfx.json index c622c383d8..3fcd94fb20 100644 --- a/examples/basic_bitcoin/dfx.json +++ b/examples/basic_bitcoin/dfx.json @@ -1,25 +1,25 @@ { "canisters": { "basic_bitcoin": { - "type": "custom", + "type": "azle", "main": "src/index.ts", - "candid": "src/index.did", - "build": "npx azle basic_bitcoin", - "wasm": ".azle/basic_bitcoin/basic_bitcoin.wasm.gz", - "declarations": { - "output": "test/dfx_generated/basic_bitcoin", - "node_compatibility": true - }, - "metadata": [ - { - "name": "candid:service", - "path": "src/index.did" - }, - { - "name": "cdk:name", - "content": "azle" - } - ] + "env": ["BITCOIN_NETWORK"] + } + }, + "networks": { + "local": { + "bind": "127.0.0.1:8000", + "type": "ephemeral", + "replica": { + "subnet_type": "system" + } + } + }, + "defaults": { + "bitcoin": { + "enabled": true, + "nodes": ["127.0.0.1:18444"], + "log_level": "info" } } } diff --git a/examples/basic_bitcoin/package-lock.json b/examples/basic_bitcoin/package-lock.json index e37ea6042a..1aa664f77a 100644 --- a/examples/basic_bitcoin/package-lock.json +++ b/examples/basic_bitcoin/package-lock.json @@ -4,23 +4,24 @@ "requires": true, "packages": { "": { + "hasInstallScript": true, "dependencies": { - "assert": "2.0.0", - "azle": "0.16.3", - "bs58": "5.0.0", - "events": "3.3.0", - "hex-array": "1.0.0", - "js-sha256": "0.9.0", - "ripemd160": "2.0.2" + "azle": "^0.21.1", + "bitcoinjs-lib": "^6.1.5", + "express": "^4.18.2" }, "devDependencies": { - "@dfinity/agent": "0.11.1", - "@types/hex-array": "1.0.0", - "@types/ripemd160": "2.0.0", - "ts-node": "10.7.0", - "typescript": "4.6.3" + "@dfinity/agent": "^0.19.2", + "@types/express": "^4.17.21", + "ts-node": "^10.9.1", + "typescript": "^5.2.2" } }, + "node_modules/@adraffy/ens-normalize": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/@adraffy/ens-normalize/-/ens-normalize-1.10.1.tgz", + "integrity": "sha512-96Z2IP3mYmF1Xg2cDm8f1gWGf/HUVedQ3FMifV4kG/PQ4yEP51xDtRAEfhVNt5f/uzpNkZHwWQuUcu6D6K+Ekw==" + }, "node_modules/@cspotcode/source-map-consumer": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz", @@ -41,70 +42,117 @@ } }, "node_modules/@dfinity/agent": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/@dfinity/agent/-/agent-0.11.1.tgz", - "integrity": "sha512-Z1zw8l3d+AG3uu7d8G/Rd9Q5MWT9gB+Cori/Rqb6IjSEribRhL36ulCSkDYZJU/dhqSUp1VlvX5u51+wgv+MLg==", + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@dfinity/agent/-/agent-0.19.3.tgz", + "integrity": "sha512-q410aNLoOA1ZkwdAMgSo6t++pjISn9TfSybRXhPRI5Ume7eG6+6qYr/rlvcXy7Nb2+Ar7LTsHNn34IULfjni7w==", "dev": true, "dependencies": { + "@noble/hashes": "^1.3.1", "base64-arraybuffer": "^0.2.0", - "bignumber.js": "^9.0.0", "borc": "^2.1.1", - "js-sha256": "0.9.0", "simple-cbor": "^0.4.1" }, "peerDependencies": { - "@dfinity/candid": "^0.11.1", - "@dfinity/principal": "^0.11.1" + "@dfinity/candid": "^0.19.3", + "@dfinity/principal": "^0.19.3" } }, "node_modules/@dfinity/candid": { - "version": "0.11.3", - "resolved": "https://registry.npmjs.org/@dfinity/candid/-/candid-0.11.3.tgz", - "integrity": "sha512-xX7xNj2lLt7SIlvy0sqNp4fpcTD/xnwEu9APj0tnIF64cnsxIiS12T1Z8jl9g80jCQ1CbRPQf4cfsOfS3Cd2OA==", + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@dfinity/candid/-/candid-0.19.3.tgz", + "integrity": "sha512-yXfbLSWTeRd4G0bLLxYoDqpXH3Jim0P+1PPZOoktXNC1X1hB+ea3yrZebX75t4GVoQK7123F7mxWHiPjuV2tQQ==", "dev": true, - "peer": true + "peer": true, + "peerDependencies": { + "@dfinity/principal": "^0.19.3" + } + }, + "node_modules/@dfinity/identity-secp256k1": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@dfinity/identity-secp256k1/-/identity-secp256k1-1.2.0.tgz", + "integrity": "sha512-QAsVycTLY0HH5OS/Ub8G0A70WZb9nkJR9fzZywUIAKpFRY8ZXHiXrT/ifM6AqY9L/83l/ywrwuSKbHVngshpkw==", + "dependencies": { + "@dfinity/agent": "^1.2.0", + "@noble/curves": "^1.4.0", + "@noble/hashes": "^1.3.1", + "asn1js": "^3.0.5", + "bip39": "^3.1.0", + "bs58check": "^3.0.1", + "hdkey": "^2.1.0" + } + }, + "node_modules/@dfinity/identity-secp256k1/node_modules/@dfinity/agent": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@dfinity/agent/-/agent-1.2.0.tgz", + "integrity": "sha512-i9mH0PO73nrhLc9lZv14SWr4muyMcs6uqqlG2SHQtRUFRXbqj4DOhKsU0Sm+kC8eWYCSu65WPKPYwwAR7YM6ug==", + "dependencies": { + "@noble/curves": "^1.4.0", + "@noble/hashes": "^1.3.1", + "base64-arraybuffer": "^0.2.0", + "borc": "^2.1.1", + "buffer": "^6.0.3", + "simple-cbor": "^0.4.1" + }, + "peerDependencies": { + "@dfinity/candid": "^1.2.0", + "@dfinity/principal": "^1.2.0" + } + }, + "node_modules/@dfinity/identity-secp256k1/node_modules/@dfinity/candid": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@dfinity/candid/-/candid-1.2.0.tgz", + "integrity": "sha512-L6gV3ODIFC9qNenq3zuRvHrTwH36IM5utVH2wMS5f5eIUeG9fNe+avYLRPBUJwdeX7cM7xhvDgE/m/aN2cZvKQ==", + "peer": true, + "peerDependencies": { + "@dfinity/principal": "^1.2.0" + } + }, + "node_modules/@dfinity/identity-secp256k1/node_modules/@dfinity/principal": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@dfinity/principal/-/principal-1.2.0.tgz", + "integrity": "sha512-7eurqPDL5ptlTTLMJPeiO75FAumXHsWEWDVQaN6XpA3aZtmofNK4Sb5g5Ne9syeuoCJcW3mFBbbFtFNxggxu+g==", + "peer": true, + "dependencies": { + "@noble/hashes": "^1.3.1" + } + }, + "node_modules/@dfinity/identity-secp256k1/node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } }, "node_modules/@dfinity/principal": { - "version": "0.11.3", - "resolved": "https://registry.npmjs.org/@dfinity/principal/-/principal-0.11.3.tgz", - "integrity": "sha512-+AJGDJ+RsveybSdxuTQFr2DPNZFpPfXnyixAOFWWdElVniSwnO/SwqQChR0AWvJdy/fKqoAXK+ZzyLG0uqSetA==", + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@dfinity/principal/-/principal-0.19.3.tgz", + "integrity": "sha512-+nixVvdGt7ECxRvLXDXsvU9q9sSPssBtDQ4bXa149SK6gcYcmZ6lfWIi3DJNqj3tGROxILVBsguel9tECappsA==", "dev": true, - "peer": true + "peer": true, + "dependencies": { + "@noble/hashes": "^1.3.1" + } }, - "node_modules/@swc/core": { - "version": "1.2.151", - "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.2.151.tgz", - "integrity": "sha512-oHgqKwK/Djv765zUHPiGqfMCaKIxXTgQyyCUBKLBQfAJwe/7FVobQ2fghBp4FsZA/NE1LZBmMPpRZNQwlGjeHw==", - "bin": { - "swcx": "run_swcx.js" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/swc" - }, - "optionalDependencies": { - "@swc/core-android-arm-eabi": "1.2.151", - "@swc/core-android-arm64": "1.2.151", - "@swc/core-darwin-arm64": "1.2.151", - "@swc/core-darwin-x64": "1.2.151", - "@swc/core-freebsd-x64": "1.2.151", - "@swc/core-linux-arm-gnueabihf": "1.2.151", - "@swc/core-linux-arm64-gnu": "1.2.151", - "@swc/core-linux-arm64-musl": "1.2.151", - "@swc/core-linux-x64-gnu": "1.2.151", - "@swc/core-linux-x64-musl": "1.2.151", - "@swc/core-win32-arm64-msvc": "1.2.151", - "@swc/core-win32-ia32-msvc": "1.2.151", - "@swc/core-win32-x64-msvc": "1.2.151" - } - }, - "node_modules/@swc/core-android-arm-eabi": { - "version": "1.2.151", - "resolved": "https://registry.npmjs.org/@swc/core-android-arm-eabi/-/core-android-arm-eabi-1.2.151.tgz", - "integrity": "sha512-Suk3IcHdha33K4hq9tfBCwkXJsENh7kjXCseLqL8Yvy8QobqkXjf1fcoJxX9BdCmPwsKmIw0ZgCBYR+Hl83M2w==", + "node_modules/@esbuild/android-arm": { + "version": "0.19.4", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.4.tgz", + "integrity": "sha512-uBIbiYMeSsy2U0XQoOGVVcpIktjLMEKa7ryz2RLr7L/vTnANNEsPVAh4xOv7ondGz6ac1zVb0F8Jx20rQikffQ==", "cpu": [ "arm" ], @@ -113,13 +161,13 @@ "android" ], "engines": { - "node": ">=10" + "node": ">=12" } }, - "node_modules/@swc/core-android-arm64": { - "version": "1.2.151", - "resolved": "https://registry.npmjs.org/@swc/core-android-arm64/-/core-android-arm64-1.2.151.tgz", - "integrity": "sha512-HZVy69dVWT5RgrMJMRK5aiicPmhzkyCHAexApYAHYLgAIhsxL7uoAIPmuRKRkrKNJjrwsWL7H27bBH5bddRDvg==", + "node_modules/@esbuild/android-arm64": { + "version": "0.19.4", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.4.tgz", + "integrity": "sha512-mRsi2vJsk4Bx/AFsNBqOH2fqedxn5L/moT58xgg51DjX1la64Z3Npicut2VbhvDFO26qjWtPMsVxCd80YTFVeg==", "cpu": [ "arm64" ], @@ -128,13 +176,28 @@ "android" ], "engines": { - "node": ">=10" + "node": ">=12" } }, - "node_modules/@swc/core-darwin-arm64": { - "version": "1.2.151", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.2.151.tgz", - "integrity": "sha512-Ql7rXMu+IC76TemRtkt+opl5iSpX2ApAXVSfvf6afNVTrfTKLpDwiR3ySRRlG0FnNIv6TfOCJpHf655xp01S/g==", + "node_modules/@esbuild/android-x64": { + "version": "0.19.4", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.4.tgz", + "integrity": "sha512-4iPufZ1TMOD3oBlGFqHXBpa3KFT46aLl6Vy7gwed0ZSYgHaZ/mihbYb4t7Z9etjkC9Al3ZYIoOaHrU60gcMy7g==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.19.4", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.4.tgz", + "integrity": "sha512-Lviw8EzxsVQKpbS+rSt6/6zjn9ashUZ7Tbuvc2YENgRl0yZTktGlachZ9KMJUsVjZEGFVu336kl5lBgDN6PmpA==", "cpu": [ "arm64" ], @@ -143,13 +206,13 @@ "darwin" ], "engines": { - "node": ">=10" + "node": ">=12" } }, - "node_modules/@swc/core-darwin-x64": { - "version": "1.2.151", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.2.151.tgz", - "integrity": "sha512-N1OBIB7xatR5eybLo91ZhvMJMxT0zxRQURV/a9I8o5CyP4iLd1k8gmrYvBbtj08ohS8F9z7k/dFjxk/9ve5Drw==", + "node_modules/@esbuild/darwin-x64": { + "version": "0.19.4", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.4.tgz", + "integrity": "sha512-YHbSFlLgDwglFn0lAO3Zsdrife9jcQXQhgRp77YiTDja23FrC2uwnhXMNkAucthsf+Psr7sTwYEryxz6FPAVqw==", "cpu": [ "x64" ], @@ -158,13 +221,28 @@ "darwin" ], "engines": { - "node": ">=10" + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.19.4", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.4.tgz", + "integrity": "sha512-vz59ijyrTG22Hshaj620e5yhs2dU1WJy723ofc+KUgxVCM6zxQESmWdMuVmUzxtGqtj5heHyB44PjV/HKsEmuQ==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" } }, - "node_modules/@swc/core-freebsd-x64": { - "version": "1.2.151", - "resolved": "https://registry.npmjs.org/@swc/core-freebsd-x64/-/core-freebsd-x64-1.2.151.tgz", - "integrity": "sha512-WVIRiDzuz+/W7BMjVtg1Cmk1+zmDT18Qq+Ygr9J6aFQ1JQUkLEE1pvtkGD3JIEa6Jhz/VwM6AFHtY5o1CrZ21w==", + "node_modules/@esbuild/freebsd-x64": { + "version": "0.19.4", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.4.tgz", + "integrity": "sha512-3sRbQ6W5kAiVQRBWREGJNd1YE7OgzS0AmOGjDmX/qZZecq8NFlQsQH0IfXjjmD0XtUYqr64e0EKNFjMUlPL3Cw==", "cpu": [ "x64" ], @@ -173,13 +251,13 @@ "freebsd" ], "engines": { - "node": ">=10" + "node": ">=12" } }, - "node_modules/@swc/core-linux-arm-gnueabihf": { - "version": "1.2.151", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.2.151.tgz", - "integrity": "sha512-pfBrIUwu3cR/M7DzDCUJAw9jFKXvJ/Ge8auFk07lRb+JcDnPm0XxLyrLqGvNQWdcHgXeXfmnS4fMQxdb9GUN1w==", + "node_modules/@esbuild/linux-arm": { + "version": "0.19.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.4.tgz", + "integrity": "sha512-z/4ArqOo9EImzTi4b6Vq+pthLnepFzJ92BnofU1jgNlcVb+UqynVFdoXMCFreTK7FdhqAzH0vmdwW5373Hm9pg==", "cpu": [ "arm" ], @@ -188,13 +266,13 @@ "linux" ], "engines": { - "node": ">=10" + "node": ">=12" } }, - "node_modules/@swc/core-linux-arm64-gnu": { - "version": "1.2.151", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.2.151.tgz", - "integrity": "sha512-M+BTkTdPY7gteM+0dYz9wrU/j9taL4ccqPEHkDEKP21lS24y99UtuKsvdBLzDm/6ShBVLFAkgIBPu5cEb7y6ig==", + "node_modules/@esbuild/linux-arm64": { + "version": "0.19.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.4.tgz", + "integrity": "sha512-ZWmWORaPbsPwmyu7eIEATFlaqm0QGt+joRE9sKcnVUG3oBbr/KYdNE2TnkzdQwX6EDRdg/x8Q4EZQTXoClUqqA==", "cpu": [ "arm64" ], @@ -203,43 +281,103 @@ "linux" ], "engines": { - "node": ">=10" + "node": ">=12" } }, - "node_modules/@swc/core-linux-arm64-musl": { - "version": "1.2.151", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.2.151.tgz", - "integrity": "sha512-7A+yTtSvPJVwO8X1cxUbD/PVCx8G9MKn83G9pH/r+9sQMBXqxyw6/NR0DG6nMMiyOmJkmYWgh5mO47BN7WC4dQ==", + "node_modules/@esbuild/linux-ia32": { + "version": "0.19.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.4.tgz", + "integrity": "sha512-EGc4vYM7i1GRUIMqRZNCTzJh25MHePYsnQfKDexD8uPTCm9mK56NIL04LUfX2aaJ+C9vyEp2fJ7jbqFEYgO9lQ==", "cpu": [ - "arm64" + "ia32" ], "optional": true, "os": [ "linux" ], "engines": { - "node": ">=10" + "node": ">=12" } }, - "node_modules/@swc/core-linux-x64-gnu": { - "version": "1.2.151", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.2.151.tgz", - "integrity": "sha512-ORlbN3wf1w0IQGjGToYYC/hV/Vwfcs88Ohfxc4X+IQaw/VxKG6/XT65c0btK640F2TVhvhH1MbYFJJlsycsW7g==", + "node_modules/@esbuild/linux-loong64": { + "version": "0.19.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.4.tgz", + "integrity": "sha512-WVhIKO26kmm8lPmNrUikxSpXcgd6HDog0cx12BUfA2PkmURHSgx9G6vA19lrlQOMw+UjMZ+l3PpbtzffCxFDRg==", "cpu": [ - "x64" + "loong64" ], "optional": true, "os": [ "linux" ], "engines": { - "node": ">=10" + "node": ">=12" } }, - "node_modules/@swc/core-linux-x64-musl": { - "version": "1.2.151", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.2.151.tgz", - "integrity": "sha512-r6odKE3+9+ReVdnNTZnICt5tscyFFtP4GFcmPQzBSlVoD9LZX6O4WeOlFXn77rVK/+205n2ag/KkKgZH+vdPuQ==", + "node_modules/@esbuild/linux-mips64el": { + "version": "0.19.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.4.tgz", + "integrity": "sha512-keYY+Hlj5w86hNp5JJPuZNbvW4jql7c1eXdBUHIJGTeN/+0QFutU3GrS+c27L+NTmzi73yhtojHk+lr2+502Mw==", + "cpu": [ + "mips64el" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.19.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.4.tgz", + "integrity": "sha512-tQ92n0WMXyEsCH4m32S21fND8VxNiVazUbU4IUGVXQpWiaAxOBvtOtbEt3cXIV3GEBydYsY8pyeRMJx9kn3rvw==", + "cpu": [ + "ppc64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.19.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.4.tgz", + "integrity": "sha512-tRRBey6fG9tqGH6V75xH3lFPpj9E8BH+N+zjSUCnFOX93kEzqS0WdyJHkta/mmJHn7MBaa++9P4ARiU4ykjhig==", + "cpu": [ + "riscv64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.19.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.4.tgz", + "integrity": "sha512-152aLpQqKZYhThiJ+uAM4PcuLCAOxDsCekIbnGzPKVBRUDlgaaAfaUl5NYkB1hgY6WN4sPkejxKlANgVcGl9Qg==", + "cpu": [ + "s390x" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.19.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.4.tgz", + "integrity": "sha512-Mi4aNA3rz1BNFtB7aGadMD0MavmzuuXNTaYL6/uiYIs08U7YMPETpgNn5oue3ICr+inKwItOwSsJDYkrE9ekVg==", "cpu": [ "x64" ], @@ -248,13 +386,58 @@ "linux" ], "engines": { - "node": ">=10" + "node": ">=12" } }, - "node_modules/@swc/core-win32-arm64-msvc": { - "version": "1.2.151", - "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.2.151.tgz", - "integrity": "sha512-jnjJTNHpLhBaPwRgiKv1TdrMljL88ePqMCdVMantyd7yl4lP0D2e5/xR9ysR9S4EGcUnOyo9w8WUYhx/TioMZw==", + "node_modules/@esbuild/netbsd-x64": { + "version": "0.19.4", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.4.tgz", + "integrity": "sha512-9+Wxx1i5N/CYo505CTT7T+ix4lVzEdz0uCoYGxM5JDVlP2YdDC1Bdz+Khv6IbqmisT0Si928eAxbmGkcbiuM/A==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.19.4", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.4.tgz", + "integrity": "sha512-MFsHleM5/rWRW9EivFssop+OulYVUoVcqkyOkjiynKBCGBj9Lihl7kh9IzrreDyXa4sNkquei5/DTP4uCk25xw==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.19.4", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.4.tgz", + "integrity": "sha512-6Xq8SpK46yLvrGxjp6HftkDwPP49puU4OF0hEL4dTxqCbfx09LyrbUj/D7tmIRMj5D5FCUPksBbxyQhp8tmHzw==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.19.4", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.4.tgz", + "integrity": "sha512-PkIl7Jq4mP6ke7QKwyg4fD4Xvn8PXisagV/+HntWoDEdmerB2LTukRZg728Yd1Fj+LuEX75t/hKXE2Ppk8Hh1w==", "cpu": [ "arm64" ], @@ -263,13 +446,13 @@ "win32" ], "engines": { - "node": ">=10" + "node": ">=12" } }, - "node_modules/@swc/core-win32-ia32-msvc": { - "version": "1.2.151", - "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.2.151.tgz", - "integrity": "sha512-hSCxAiyDDXKvdUExj4jSIhzWFePqoqak1qdNUjlhEhEinDG8T8PTRCLalyW6fqZDcLf6Tqde7H79AqbfhRlYGQ==", + "node_modules/@esbuild/win32-ia32": { + "version": "0.19.4", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.4.tgz", + "integrity": "sha512-ga676Hnvw7/ycdKB53qPusvsKdwrWzEyJ+AtItHGoARszIqvjffTwaaW3b2L6l90i7MO9i+dlAW415INuRhSGg==", "cpu": [ "ia32" ], @@ -278,13 +461,13 @@ "win32" ], "engines": { - "node": ">=10" + "node": ">=12" } }, - "node_modules/@swc/core-win32-x64-msvc": { - "version": "1.2.151", - "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.2.151.tgz", - "integrity": "sha512-HOkqcJWCChps83Maj0M5kifPDuZ2sGPqpLM67poawspTFkBh0QJ9TMmxW1doQw+74cqsTpRi1ewr/KhsN18i5g==", + "node_modules/@esbuild/win32-x64": { + "version": "0.19.4", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.4.tgz", + "integrity": "sha512-HP0GDNla1T3ZL8Ko/SHAS2GgtjOg+VmWnnYLhuTksr++EnduYB0f3Y2LzHsUwb2iQ13JGoY6G3R8h6Du/WG6uA==", "cpu": [ "x64" ], @@ -293,957 +476,2098 @@ "win32" ], "engines": { - "node": ">=10" + "node": ">=12" } }, - "node_modules/@tsconfig/node10": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", - "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==" - }, - "node_modules/@tsconfig/node12": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", - "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==" - }, - "node_modules/@tsconfig/node14": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", - "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==" - }, - "node_modules/@tsconfig/node16": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", - "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==" + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } }, - "node_modules/@types/hex-array": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@types/hex-array/-/hex-array-1.0.0.tgz", - "integrity": "sha512-DiHkbvklZELsTQyuATAvrQW2CAHJX87VK8olXxQaREB+KGgYx/LiBERKRnhXC3T1lST4vuOwUrmrOyGloDS4gA==", + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", "dev": true }, - "node_modules/@types/node": { - "version": "20.2.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.2.3.tgz", - "integrity": "sha512-pg9d0yC4rVNWQzX8U7xb4olIOFuuVL9za3bzMT2pu2SU0SNEi66i2qrvhE2qt0HvkhuCaWJu7pLNOt/Pj8BIrw==" - }, - "node_modules/@types/ripemd160": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@types/ripemd160/-/ripemd160-2.0.0.tgz", - "integrity": "sha512-LD6AO/+8cAa1ghXax9NG9iPDLPUEGB2WWPjd//04KYfXxTwHvlDEfL0NRjrM5z9XWBi6WbKw75Are0rDyn3PSA==", + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", "dev": true, "dependencies": { - "@types/node": "*" + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" } }, - "node_modules/acorn": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", - "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", - "bin": { - "acorn": "bin/acorn" + "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" }, - "engines": { - "node": ">=0.4.0" + "funding": { + "url": "https://paulmillr.com/funding/" } }, - "node_modules/acorn-walk": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", - "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "node_modules/@noble/curves/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": ">=0.4.0" + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" } }, - "node_modules/arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==" + "node_modules/@noble/hashes": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", + "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } }, - "node_modules/assert": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/assert/-/assert-2.0.0.tgz", - "integrity": "sha512-se5Cd+js9dXJnu6Ag2JFc00t+HmHOen+8Q+L7O9zI0PqQXr20uk2J0XQqMxZEeo5U50o8Nvmmx7dZrl+Ufr35A==", + "node_modules/@swc/core": { + "version": "1.3.91", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.3.91.tgz", + "integrity": "sha512-r950d0fdlZ8qbSDyvApn3HyCojiZE8xpgJzQvypeMi32dalYwugdJKWyLB55JIGMRGJ8+lmVvY4MPGkSR3kXgA==", + "hasInstallScript": true, + "optional": true, + "peer": true, "dependencies": { - "es6-object-assign": "^1.1.0", - "is-nan": "^1.2.1", - "object-is": "^1.0.1", - "util": "^0.12.0" - } - }, - "node_modules/available-typed-arrays": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", - "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "@swc/counter": "^0.1.1", + "@swc/types": "^0.1.5" + }, "engines": { - "node": ">= 0.4" + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/azle": { - "version": "0.16.3", - "resolved": "https://registry.npmjs.org/azle/-/azle-0.16.3.tgz", - "integrity": "sha512-6JWTLCg261bKZACL0BiCZQ93gHhoB0dv5g6Tn1ixAkuIlWASyQjvpth4PJ/e9AkNh1kI3sltwjqVfrmtll48qg==", - "dependencies": { - "@dfinity/principal": "0.11.2", - "@swc/core": "1.2.151", - "azle-syn": "0.0.0", - "esbuild": "0.14.25", - "fs-extra": "10.0.1", - "js-sha256": "0.9.0", - "ts-node": "10.3.1", - "typescript": "4.4.4" - }, - "bin": { - "azle": "bin.js" - } - }, - "node_modules/azle-syn": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/azle-syn/-/azle-syn-0.0.0.tgz", - "integrity": "sha512-fWExJb5/hOEJOuBQ8hMMHRs9WryYeLLa9/ydqPWxbwjMEpE8RKdU1dTK6mdZtzNMhbeHdyne2pU1iVKiKmImGw==" - }, - "node_modules/azle/node_modules/@dfinity/principal": { - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/@dfinity/principal/-/principal-0.11.2.tgz", - "integrity": "sha512-vReWruqIl16yQeKOrCLDLDf2aTEJsXcKeW9qbwVfmV0kwLNE3B2Z6tbRjYbY7s+KwpysD5B1b48ZbIwI00BeyQ==" - }, - "node_modules/azle/node_modules/ts-node": { - "version": "10.3.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.3.1.tgz", - "integrity": "sha512-Yw3W2mYzhHfCHOICGNJqa0i+rbL0rAyg7ZIHxU+K4pgY8gd2Lh1j+XbHCusJMykbj6RZMJVOY0MlHVd+GOivcw==", - "dependencies": { - "@cspotcode/source-map-support": "0.7.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "yn": "3.1.1" + "type": "opencollective", + "url": "https://opencollective.com/swc" }, - "bin": { - "ts-node": "dist/bin.js", - "ts-node-cwd": "dist/bin-cwd.js", - "ts-node-script": "dist/bin-script.js", - "ts-node-transpile-only": "dist/bin-transpile.js", - "ts-script": "dist/bin-script-deprecated.js" + "optionalDependencies": { + "@swc/core-darwin-arm64": "1.3.91", + "@swc/core-darwin-x64": "1.3.91", + "@swc/core-linux-arm-gnueabihf": "1.3.91", + "@swc/core-linux-arm64-gnu": "1.3.91", + "@swc/core-linux-arm64-musl": "1.3.91", + "@swc/core-linux-x64-gnu": "1.3.91", + "@swc/core-linux-x64-musl": "1.3.91", + "@swc/core-win32-arm64-msvc": "1.3.91", + "@swc/core-win32-ia32-msvc": "1.3.91", + "@swc/core-win32-x64-msvc": "1.3.91" }, "peerDependencies": { - "@swc/core": ">=1.2.50", - "@swc/wasm": ">=1.2.50", - "@types/node": "*", - "typescript": ">=2.7" + "@swc/helpers": "^0.5.0" }, "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "@swc/wasm": { + "@swc/helpers": { "optional": true } } }, - "node_modules/azle/node_modules/typescript": { - "version": "4.4.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.4.tgz", - "integrity": "sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA==", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "node_modules/base-x": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/base-x/-/base-x-4.0.0.tgz", - "integrity": "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw==" - }, - "node_modules/base64-arraybuffer": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.2.0.tgz", - "integrity": "sha512-7emyCsu1/xiBXgQZrscw/8KPRT44I4Yq9Pe6EGs3aPRTsWuggML1/1DTuZUuIaJPIm1FTDUVXl4x/yW8s0kQDQ==", - "dev": true, - "engines": { - "node": ">= 0.6.0" - } - }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/bignumber.js": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.1.tgz", - "integrity": "sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/borc": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/borc/-/borc-2.1.2.tgz", - "integrity": "sha512-Sy9eoUi4OiKzq7VovMn246iTo17kzuyHJKomCfpWMlI6RpfN1gk95w7d7gH264nApVLg0HZfcpz62/g4VH1Y4w==", - "dev": true, - "dependencies": { - "bignumber.js": "^9.0.0", - "buffer": "^5.5.0", - "commander": "^2.15.0", - "ieee754": "^1.1.13", - "iso-url": "~0.4.7", - "json-text-sequence": "~0.1.0", - "readable-stream": "^3.6.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/bs58": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz", - "integrity": "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==", - "dependencies": { - "base-x": "^4.0.0" - } - }, - "node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "node_modules/@swc/core-darwin-arm64": { + "version": "1.3.91", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.91.tgz", + "integrity": "sha512-7kHGiQ1he5khcEeJuHDmLZPM3rRL/ith5OTmV6bOPsoHi46kLeixORW+ts1opC3tC9vu6xbk16xgX0QAJchc1w==", + "cpu": [ + "arm64" + ], "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } + "optional": true, + "os": [ + "darwin" ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "node_modules/call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - }, - "node_modules/create-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==" - }, - "node_modules/define-properties": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", - "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", - "dependencies": { - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/delimit-stream": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/delimit-stream/-/delimit-stream-0.1.0.tgz", - "integrity": "sha512-a02fiQ7poS5CnjiJBAsjGLPp5EwVoGHNeu9sziBd9huppRfsAFIpv5zNLv0V1gbop53ilngAf5Kf331AwcoRBQ==", - "dev": true - }, - "node_modules/diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "peer": true, "engines": { - "node": ">=0.3.1" + "node": ">=10" } }, - "node_modules/es6-object-assign": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/es6-object-assign/-/es6-object-assign-1.1.0.tgz", - "integrity": "sha512-MEl9uirslVwqQU369iHNWZXsI8yaZYGg/D65aOgZkeyFJwHYSxilf7rQzXKI7DdDuBPrBXbfk3sl9hJhmd5AUw==" - }, - "node_modules/esbuild": { - "version": "0.14.25", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.25.tgz", - "integrity": "sha512-4JHEIOMNFvK09ziiL+iVmldIhLbn49V4NAVo888tcGFKedEZY/Y8YapfStJ6zSE23tzYPKxqKwQBnQoIO0BI/Q==", - "hasInstallScript": true, - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=12" - }, - "optionalDependencies": { - "esbuild-android-64": "0.14.25", - "esbuild-android-arm64": "0.14.25", - "esbuild-darwin-64": "0.14.25", - "esbuild-darwin-arm64": "0.14.25", - "esbuild-freebsd-64": "0.14.25", - "esbuild-freebsd-arm64": "0.14.25", - "esbuild-linux-32": "0.14.25", - "esbuild-linux-64": "0.14.25", - "esbuild-linux-arm": "0.14.25", - "esbuild-linux-arm64": "0.14.25", - "esbuild-linux-mips64le": "0.14.25", - "esbuild-linux-ppc64le": "0.14.25", - "esbuild-linux-riscv64": "0.14.25", - "esbuild-linux-s390x": "0.14.25", - "esbuild-netbsd-64": "0.14.25", - "esbuild-openbsd-64": "0.14.25", - "esbuild-sunos-64": "0.14.25", - "esbuild-windows-32": "0.14.25", - "esbuild-windows-64": "0.14.25", - "esbuild-windows-arm64": "0.14.25" - } - }, - "node_modules/esbuild-android-64": { - "version": "0.14.25", - "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.14.25.tgz", - "integrity": "sha512-L5vCUk7TzFbBnoESNoXjU3x9+/+7TDIE/1mTfy/erAfvZAqC+S3sp/Qa9wkypFMcFvN9FzvESkTlpeQDolREtQ==", + "node_modules/@swc/core-darwin-x64": { + "version": "1.3.91", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.3.91.tgz", + "integrity": "sha512-8SpU18FbFpZDVzsHsAwdI1thF/picQGxq9UFxa8W+T9SDnbsqwFJv/6RqKJeJoDV6qFdl2OLjuO0OL7xrp0qnQ==", "cpu": [ "x64" ], + "dev": true, "optional": true, "os": [ - "android" + "darwin" ], + "peer": true, "engines": { - "node": ">=12" + "node": ">=10" } }, - "node_modules/esbuild-android-arm64": { - "version": "0.14.25", - "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.25.tgz", - "integrity": "sha512-4jv5xPjM/qNm27T5j3ZEck0PvjgQtoMHnz4FzwF5zNP56PvY2CT0WStcAIl6jNlsuDdN63rk2HRBIsO6xFbcFw==", + "node_modules/@swc/core-linux-arm-gnueabihf": { + "version": "1.3.91", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.3.91.tgz", + "integrity": "sha512-fOq4Cy8UbwX1yf0WB0d8hWZaIKCnPtPGguRqdXGLfwvhjZ9SIErT6PnmGTGRbQCNCIkOZWHKyTU0r8t2dN3haQ==", "cpu": [ - "arm64" + "arm" ], + "dev": true, "optional": true, "os": [ - "android" + "linux" ], + "peer": true, "engines": { - "node": ">=12" + "node": ">=10" } }, - "node_modules/esbuild-darwin-64": { - "version": "0.14.25", - "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.25.tgz", - "integrity": "sha512-TGp8tuudIxOyWd1+8aYPxQmC1ZQyvij/AfNBa35RubixD0zJ1vkKHVAzo0Zao1zcG6pNqiSyzfPto8vmg0s7oA==", + "node_modules/@swc/core-linux-arm64-gnu": { + "version": "1.3.91", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.91.tgz", + "integrity": "sha512-fki4ioRP/Esy4vdp8T34RCV+V9dqkRmOt763pf74pdiyFV2dPLXa5lnw/XvR1RTfPGknrYgjEQLCfZlReTryRw==", "cpu": [ - "x64" + "arm64" ], + "dev": true, "optional": true, "os": [ - "darwin" + "linux" ], + "peer": true, "engines": { - "node": ">=12" + "node": ">=10" } }, - "node_modules/esbuild-darwin-arm64": { - "version": "0.14.25", - "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.25.tgz", - "integrity": "sha512-oTcDgdm0MDVEmw2DWu8BV68pYuImpFgvWREPErBZmNA4MYKGuBRaCiJqq6jZmBR1x+3y1DWCjez+5uLtuAm6mw==", + "node_modules/@swc/core-linux-arm64-musl": { + "version": "1.3.91", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.91.tgz", + "integrity": "sha512-XrG+DUUqNtfVLcJ20imby7fpBwQNG5VsEQBzQndSonPyUOa2YkTbBb60YDondfQGDABopuHH8gHN8o2H2/VCnQ==", "cpu": [ "arm64" ], + "dev": true, "optional": true, "os": [ - "darwin" + "linux" ], + "peer": true, "engines": { - "node": ">=12" + "node": ">=10" } }, - "node_modules/esbuild-freebsd-64": { - "version": "0.14.25", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.25.tgz", - "integrity": "sha512-ueAqbnMZ8arnuLH8tHwTCQYeptnHOUV7vA6px6j4zjjQwDx7TdP7kACPf3TLZLdJQ3CAD1XCvQ2sPhX+8tacvQ==", + "node_modules/@swc/core-linux-x64-gnu": { + "version": "1.3.91", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.91.tgz", + "integrity": "sha512-d11bYhX+YPBr/Frcjc6eVn3C0LuS/9U1Li9EmQ+6s9EpYtYRl2ygSlC8eueLbaiazBnCVYFnc8bU4o0kc5B9sw==", "cpu": [ "x64" ], + "dev": true, "optional": true, "os": [ - "freebsd" + "linux" ], + "peer": true, "engines": { - "node": ">=12" + "node": ">=10" } }, - "node_modules/esbuild-freebsd-arm64": { - "version": "0.14.25", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.25.tgz", - "integrity": "sha512-+ZVWud2HKh+Ob6k/qiJWjBtUg4KmJGGmbvEXXW1SNKS7hW7HU+Zq2ZCcE1akFxOPkVB+EhOty/sSek30tkCYug==", + "node_modules/@swc/core-linux-x64-musl": { + "version": "1.3.91", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.91.tgz", + "integrity": "sha512-2SRp5Dke2P4jCQePkDx9trkkTstnRpZJVw5r3jvYdk0zeO6iC4+ZPvvoWXJLigqQv/fZnIiSUfJ6ssOoaEqTzQ==", "cpu": [ - "arm64" + "x64" ], + "dev": true, "optional": true, "os": [ - "freebsd" + "linux" ], + "peer": true, "engines": { - "node": ">=12" + "node": ">=10" } }, - "node_modules/esbuild-linux-32": { - "version": "0.14.25", - "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.25.tgz", - "integrity": "sha512-3OP/lwV3kCzEz45tobH9nj+uE4ubhGsfx+tn0L26WAGtUbmmcRpqy7XRG/qK7h1mClZ+eguIANcQntYMdYklfw==", + "node_modules/@swc/core-win32-arm64-msvc": { + "version": "1.3.91", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.91.tgz", + "integrity": "sha512-l9qKXikOxj42UIjbeZpz9xtBmr736jOMqInNP8mVF2/U+ws5sI8zJjcOFFtfis4ru7vWCXhB1wtltdlJYO2vGA==", "cpu": [ - "ia32" + "arm64" ], + "dev": true, "optional": true, "os": [ - "linux" + "win32" ], + "peer": true, "engines": { - "node": ">=12" + "node": ">=10" } }, - "node_modules/esbuild-linux-64": { - "version": "0.14.25", - "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.25.tgz", - "integrity": "sha512-+aKHdHZmX9qwVlQmu5xYXh7GsBFf4TWrePgeJTalhXHOG7NNuUwoHmketGiZEoNsWyyqwH9rE5BC+iwcLY30Ug==", + "node_modules/@swc/core-win32-ia32-msvc": { + "version": "1.3.91", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.91.tgz", + "integrity": "sha512-+s+52O0QVPmzOgjEe/rcb0AK6q/J7EHKwAyJCu/FaYO9df5ovE0HJjSKP6HAF0dGPO5hkENrXuNGujofUH9vtQ==", "cpu": [ - "x64" + "ia32" ], + "dev": true, "optional": true, "os": [ - "linux" + "win32" ], + "peer": true, "engines": { - "node": ">=12" + "node": ">=10" } }, - "node_modules/esbuild-linux-arm": { - "version": "0.14.25", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.25.tgz", - "integrity": "sha512-aTLcE2VBoLydL943REcAcgnDi3bHtmULSXWLbjtBdtykRatJVSxKMjK9YlBXUZC4/YcNQfH7AxwVeQr9fNxPhw==", + "node_modules/@swc/core-win32-x64-msvc": { + "version": "1.3.91", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.91.tgz", + "integrity": "sha512-7u9HDQhjUC3Gv43EFW84dZtduWCSa4MgltK+Sp9zEGti6WXqDPu/ESjvDsQEVYTBEMEvZs/xVAXPgLVHorV5nQ==", "cpu": [ - "arm" + "x64" ], + "dev": true, "optional": true, "os": [ - "linux" + "win32" ], + "peer": true, "engines": { - "node": ">=12" + "node": ">=10" } }, - "node_modules/esbuild-linux-arm64": { - "version": "0.14.25", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.25.tgz", - "integrity": "sha512-UxfenPx/wSZx55gScCImPtXekvZQLI2GW3qe5dtlmU7luiqhp5GWPzGeQEbD3yN3xg/pHc671m5bma5Ns7lBHw==", - "cpu": [ - "arm64" - ], + "node_modules/@swc/counter": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.2.tgz", + "integrity": "sha512-9F4ys4C74eSTEUNndnER3VJ15oru2NumfQxS8geE+f3eB5xvfxpWyqE5XlVnxb/R14uoXi6SLbBwwiDSkv+XEw==", "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } + "peer": true }, - "node_modules/esbuild-linux-mips64le": { - "version": "0.14.25", - "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.25.tgz", - "integrity": "sha512-wLWYyqVfYx9Ur6eU5RT92yJVsaBGi5RdkoWqRHOqcJ38Kn60QMlcghsKeWfe9jcYut8LangYZ98xO1LxIoSXrQ==", - "cpu": [ - "mips64el" - ], + "node_modules/@swc/types": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.5.tgz", + "integrity": "sha512-myfUej5naTBWnqOCc/MdVOLVjXUXtIA+NpDrDBKJtLLg2shUjBu3cZmB/85RyitKc55+lUUyl7oRfLOvkr2hsw==", "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } + "peer": true }, - "node_modules/esbuild-linux-ppc64le": { - "version": "0.14.25", - "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.25.tgz", - "integrity": "sha512-0dR6Csl6Zas3g4p9ULckEl8Mo8IInJh33VCJ3eaV1hj9+MHGdmDOakYMN8MZP9/5nl+NU/0ygpd14cWgy8uqRw==", - "cpu": [ - "ppc64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" + "node_modules/@tsconfig/node10": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", + "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==" + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==" + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==" + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==" + }, + "node_modules/@types/body-parser": { + "version": "1.19.5", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.5.tgz", + "integrity": "sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==", + "dev": true, + "dependencies": { + "@types/connect": "*", + "@types/node": "*" } }, - "node_modules/esbuild-linux-riscv64": { - "version": "0.14.25", - "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.25.tgz", - "integrity": "sha512-J4d20HDmTrgvhR0bdkDhvvJGaikH3LzXQnNaseo8rcw9Yqby9A90gKUmWpfwqLVNRILvNnAmKLfBjCKU9ajg8w==", - "cpu": [ - "riscv64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" + "node_modules/@types/connect": { + "version": "3.4.38", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", + "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", + "dev": true, + "dependencies": { + "@types/node": "*" } }, - "node_modules/esbuild-linux-s390x": { - "version": "0.14.25", - "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.25.tgz", - "integrity": "sha512-YI2d5V6nTE73ZnhEKQD7MtsPs1EtUZJ3obS21oxQxGbbRw1G+PtJKjNyur+3t6nzHP9oTg6GHQ3S3hOLLmbDIQ==", - "cpu": [ - "s390x" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" + "node_modules/@types/express": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.21.tgz", + "integrity": "sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==", + "dev": true, + "dependencies": { + "@types/body-parser": "*", + "@types/express-serve-static-core": "^4.17.33", + "@types/qs": "*", + "@types/serve-static": "*" } }, - "node_modules/esbuild-netbsd-64": { - "version": "0.14.25", - "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.25.tgz", - "integrity": "sha512-TKIVgNWLUOkr+Exrye70XTEE1lJjdQXdM4tAXRzfHE9iBA7LXWcNtVIuSnphTqpanPzTDFarF0yqq4kpbC6miA==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=12" + "node_modules/@types/express-serve-static-core": { + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.0.tgz", + "integrity": "sha512-bGyep3JqPCRry1wq+O5n7oiBgGWmeIJXPjXXCo8EK0u8duZGSYar7cGqd3ML2JUsLGeB7fmc06KYo9fLGWqPvQ==", + "dev": true, + "dependencies": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*", + "@types/send": "*" } }, - "node_modules/esbuild-openbsd-64": { - "version": "0.14.25", - "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.25.tgz", - "integrity": "sha512-QgFJ37A15D7NIXBTYEqz29+uw3nNBOIyog+3kFidANn6kjw0GHZ0lEYQn+cwjyzu94WobR+fes7cTl/ZYlHb1A==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=12" + "node_modules/@types/http-errors": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz", + "integrity": "sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==", + "dev": true + }, + "node_modules/@types/mime": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz", + "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==", + "dev": true + }, + "node_modules/@types/node": { + "version": "20.2.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.2.3.tgz", + "integrity": "sha512-pg9d0yC4rVNWQzX8U7xb4olIOFuuVL9za3bzMT2pu2SU0SNEi66i2qrvhE2qt0HvkhuCaWJu7pLNOt/Pj8BIrw==" + }, + "node_modules/@types/qs": { + "version": "6.9.15", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.15.tgz", + "integrity": "sha512-uXHQKES6DQKKCLh441Xv/dwxOq1TVS3JPUMlEqoEglvlhR6Mxnlew/Xq/LRVHpLyk7iK3zODe1qYHIMltO7XGg==", + "dev": true + }, + "node_modules/@types/range-parser": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz", + "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==", + "dev": true + }, + "node_modules/@types/send": { + "version": "0.17.4", + "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.4.tgz", + "integrity": "sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==", + "dev": true, + "dependencies": { + "@types/mime": "^1", + "@types/node": "*" } }, - "node_modules/esbuild-sunos-64": { - "version": "0.14.25", - "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.25.tgz", - "integrity": "sha512-rmWfjUItYIVlqr5EnTH1+GCxXiBOC42WBZ3w++qh7n2cS9Xo0lO5pGSG2N+huOU2fX5L+6YUuJ78/vOYvefeFw==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=12" + "node_modules/@types/serve-static": { + "version": "1.15.7", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.7.tgz", + "integrity": "sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw==", + "dev": true, + "dependencies": { + "@types/http-errors": "*", + "@types/node": "*", + "@types/send": "*" } }, - "node_modules/esbuild-windows-32": { - "version": "0.14.25", - "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.25.tgz", - "integrity": "sha512-HGAxVUofl3iUIz9W10Y9XKtD0bNsK9fBXv1D55N/ljNvkrAYcGB8YCm0v7DjlwtyS6ws3dkdQyXadbxkbzaKOA==", - "cpu": [ - "ia32" - ], - "optional": true, - "os": [ - "win32" - ], + "node_modules/@types/uuid": { + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.4.tgz", + "integrity": "sha512-zAuJWQflfx6dYJM62vna+Sn5aeSWhh3OB+wfUEACNcqUSc0AGc5JKl+ycL1vrH7frGTXhJchYjE1Hak8L819dA==" + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, "engines": { - "node": ">=12" + "node": ">= 0.6" } }, - "node_modules/esbuild-windows-64": { - "version": "0.14.25", - "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.25.tgz", - "integrity": "sha512-TirEohRkfWU9hXLgoDxzhMQD1g8I2mOqvdQF2RS9E/wbkORTAqJHyh7wqGRCQAwNzdNXdg3JAyhQ9/177AadWA==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "win32" - ], + "node_modules/acorn": { + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "bin": { + "acorn": "bin/acorn" + }, "engines": { - "node": ">=12" + "node": ">=0.4.0" } }, - "node_modules/esbuild-windows-arm64": { - "version": "0.14.25", - "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.25.tgz", - "integrity": "sha512-4ype9ERiI45rSh+R8qUoBtaj6kJvUOI7oVLhKqPEpcF4Pa5PpT3hm/mXAyotJHREkHpM87PAJcA442mLnbtlNA==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "win32" - ], + "node_modules/acorn-walk": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", + "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", "engines": { - "node": ">=12" + "node": ">=0.4.0" } }, - "node_modules/events": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "node_modules/aes-js": { + "version": "4.0.0-beta.5", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-4.0.0-beta.5.tgz", + "integrity": "sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q==" + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, "engines": { - "node": ">=0.8.x" + "node": ">= 8" } }, - "node_modules/for-each": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", - "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==" + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" + }, + "node_modules/asn1.js": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", + "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", "dependencies": { - "is-callable": "^1.1.3" + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "safer-buffer": "^2.1.0" } }, - "node_modules/fs-extra": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.1.tgz", - "integrity": "sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag==", + "node_modules/asn1.js/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "node_modules/asn1js": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/asn1js/-/asn1js-3.0.5.tgz", + "integrity": "sha512-FVnvrKJwpt9LP2lAMl8qZswRNm3T4q9CON+bxldk2iwk3FFpuwhx2FfinyitizWHsVYyaY+y5JzDR0rCMV5yTQ==", "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" + "pvtsutils": "^1.3.2", + "pvutils": "^1.1.3", + "tslib": "^2.4.0" }, "engines": { - "node": ">=12" + "node": ">=12.0.0" } }, - "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" - }, - "node_modules/get-intrinsic": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", - "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "node_modules/azle": { + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/azle/-/azle-0.21.1.tgz", + "integrity": "sha512-pPAMmgs4X7joasm4YnfZibnEEDgvtYwfpScfSqcOgRLYJnRwil+xgnkIns/F3iAaRoRmy84pPKPIN5J3ysHQRw==", "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3" + "@dfinity/agent": "^1.1.0", + "@dfinity/identity-secp256k1": "^1.1.0", + "@types/uuid": "^9.0.4", + "buffer": "^6.0.3", + "chokidar": "^3.6.0", + "crypto-browserify": "^3.12.0", + "esbuild": "^0.19.3", + "ethers": "^6.11.1", + "fs-extra": "10.0.1", + "hash-of-directory": "^1.0.1", + "http-message-parser": "^0.0.34", + "js-sha256": "0.9.0", + "net": "^1.0.2", + "pako": "^2.1.0", + "text-encoding": "0.7.0", + "ts-node": "10.3.1", + "typescript": "^5.2.2", + "uuid": "^9.0.1" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "bin": { + "azle": "bin.js" } }, - "node_modules/gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "node_modules/azle/node_modules/@dfinity/agent": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@dfinity/agent/-/agent-1.2.0.tgz", + "integrity": "sha512-i9mH0PO73nrhLc9lZv14SWr4muyMcs6uqqlG2SHQtRUFRXbqj4DOhKsU0Sm+kC8eWYCSu65WPKPYwwAR7YM6ug==", "dependencies": { - "get-intrinsic": "^1.1.3" + "@noble/curves": "^1.4.0", + "@noble/hashes": "^1.3.1", + "base64-arraybuffer": "^0.2.0", + "borc": "^2.1.1", + "buffer": "^6.0.3", + "simple-cbor": "^0.4.1" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "peerDependencies": { + "@dfinity/candid": "^1.2.0", + "@dfinity/principal": "^1.2.0" } }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" + "node_modules/azle/node_modules/@dfinity/candid": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@dfinity/candid/-/candid-1.2.0.tgz", + "integrity": "sha512-L6gV3ODIFC9qNenq3zuRvHrTwH36IM5utVH2wMS5f5eIUeG9fNe+avYLRPBUJwdeX7cM7xhvDgE/m/aN2cZvKQ==", + "peer": true, + "peerDependencies": { + "@dfinity/principal": "^1.2.0" + } }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "node_modules/azle/node_modules/@dfinity/principal": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@dfinity/principal/-/principal-1.2.0.tgz", + "integrity": "sha512-7eurqPDL5ptlTTLMJPeiO75FAumXHsWEWDVQaN6XpA3aZtmofNK4Sb5g5Ne9syeuoCJcW3mFBbbFtFNxggxu+g==", + "peer": true, "dependencies": { - "function-bind": "^1.1.1" - }, + "@noble/hashes": "^1.3.1" + } + }, + "node_modules/azle/node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/azle/node_modules/ts-node": { + "version": "10.3.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.3.1.tgz", + "integrity": "sha512-Yw3W2mYzhHfCHOICGNJqa0i+rbL0rAyg7ZIHxU+K4pgY8gd2Lh1j+XbHCusJMykbj6RZMJVOY0MlHVd+GOivcw==", + "dependencies": { + "@cspotcode/source-map-support": "0.7.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, + "node_modules/base-x": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-4.0.0.tgz", + "integrity": "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw==" + }, + "node_modules/base64-arraybuffer": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.2.0.tgz", + "integrity": "sha512-7emyCsu1/xiBXgQZrscw/8KPRT44I4Yq9Pe6EGs3aPRTsWuggML1/1DTuZUuIaJPIm1FTDUVXl4x/yW8s0kQDQ==", + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/bech32": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz", + "integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==" + }, + "node_modules/bignumber.js": { + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.1.tgz", + "integrity": "sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig==", + "engines": { + "node": "*" + } + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "engines": { + "node": ">=8" + } + }, + "node_modules/bip174": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bip174/-/bip174-2.1.1.tgz", + "integrity": "sha512-mdFV5+/v0XyNYXjBS6CQPLo9ekCx4gtKZFnJm5PMto7Fs9hTTDpkkzOB7/FtluRI6JbUUAu+snTYfJRgHLZbZQ==", + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/bip39": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bip39/-/bip39-3.1.0.tgz", + "integrity": "sha512-c9kiwdk45Do5GL0vJMe7tS95VjCii65mYAH7DfWl3uW8AVzXKQVUm64i3hzVybBDMp9r7j9iNxR85+ul8MdN/A==", + "dependencies": { + "@noble/hashes": "^1.2.0" + } + }, + "node_modules/bitcoinjs-lib": { + "version": "6.1.5", + "resolved": "https://registry.npmjs.org/bitcoinjs-lib/-/bitcoinjs-lib-6.1.5.tgz", + "integrity": "sha512-yuf6xs9QX/E8LWE2aMJPNd0IxGofwfuVOiYdNUESkc+2bHHVKjhJd8qewqapeoolh9fihzHGoDCB5Vkr57RZCQ==", + "dependencies": { + "@noble/hashes": "^1.2.0", + "bech32": "^2.0.0", + "bip174": "^2.1.1", + "bs58check": "^3.0.1", + "typeforce": "^1.11.3", + "varuint-bitcoin": "^1.1.2" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" + }, + "node_modules/body-parser": { + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", + "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.5", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.2", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/borc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/borc/-/borc-2.1.2.tgz", + "integrity": "sha512-Sy9eoUi4OiKzq7VovMn246iTo17kzuyHJKomCfpWMlI6RpfN1gk95w7d7gH264nApVLg0HZfcpz62/g4VH1Y4w==", + "dependencies": { + "bignumber.js": "^9.0.0", + "buffer": "^5.5.0", + "commander": "^2.15.0", + "ieee754": "^1.1.13", + "iso-url": "~0.4.7", + "json-text-sequence": "~0.1.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==" + }, + "node_modules/browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "dependencies": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "dependencies": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } + }, + "node_modules/browserify-des": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", + "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "dependencies": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/browserify-rsa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz", + "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==", + "dependencies": { + "bn.js": "^5.0.0", + "randombytes": "^2.0.1" + } + }, + "node_modules/browserify-sign": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.2.tgz", + "integrity": "sha512-1rudGyeYY42Dk6texmv7c4VcQ0EsvVbLwZkA+AQB7SxvXxmcD93jcHie8bzecJ+ChDlmAm2Qyu0+Ccg5uhZXCg==", + "dependencies": { + "bn.js": "^5.2.1", + "browserify-rsa": "^4.1.0", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "elliptic": "^6.5.4", + "inherits": "^2.0.4", + "parse-asn1": "^5.1.6", + "readable-stream": "^3.6.2", + "safe-buffer": "^5.2.1" + }, + "engines": { + "node": ">= 4" + } + }, + "node_modules/bs58": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz", + "integrity": "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==", + "dependencies": { + "base-x": "^4.0.0" + } + }, + "node_modules/bs58check": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-3.0.1.tgz", + "integrity": "sha512-hjuuJvoWEybo7Hn/0xOrczQKKEKD63WguEjlhLExYs2wUBcebDC1jDNK17eEAD2lYfw82d5ASC1d7K3SWszjaQ==", + "dependencies": { + "@noble/hashes": "^1.2.0", + "bs58": "^5.0.0" + } + }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" + }, + "node_modules/buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==" + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + }, + "node_modules/concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "engines": [ + "node >= 0.8" + ], + "dependencies": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "node_modules/concat-stream/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/concat-stream/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/concat-stream/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/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + }, + "node_modules/create-ecdh": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", + "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", + "dependencies": { + "bn.js": "^4.1.0", + "elliptic": "^6.5.3" + } + }, + "node_modules/create-ecdh/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "node_modules/create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "dependencies": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "node_modules/create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "dependencies": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==" + }, + "node_modules/crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "dependencies": { + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" + }, + "engines": { + "node": "*" + } + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/delimit-stream": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/delimit-stream/-/delimit-stream-0.1.0.tgz", + "integrity": "sha512-a02fiQ7poS5CnjiJBAsjGLPp5EwVoGHNeu9sziBd9huppRfsAFIpv5zNLv0V1gbop53ilngAf5Kf331AwcoRBQ==" + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/des.js": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.1.0.tgz", + "integrity": "sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg==", + "dependencies": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "dependencies": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + } + }, + "node_modules/diffie-hellman/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" + }, + "node_modules/elliptic": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "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" + } + }, + "node_modules/elliptic/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/esbuild": { + "version": "0.19.4", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.4.tgz", + "integrity": "sha512-x7jL0tbRRpv4QUyuDMjONtWFciygUxWaUM1kMX2zWxI0X2YWOt7MSA0g4UdeSiHM8fcYVzpQhKYOycZwxTdZkA==", + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/android-arm": "0.19.4", + "@esbuild/android-arm64": "0.19.4", + "@esbuild/android-x64": "0.19.4", + "@esbuild/darwin-arm64": "0.19.4", + "@esbuild/darwin-x64": "0.19.4", + "@esbuild/freebsd-arm64": "0.19.4", + "@esbuild/freebsd-x64": "0.19.4", + "@esbuild/linux-arm": "0.19.4", + "@esbuild/linux-arm64": "0.19.4", + "@esbuild/linux-ia32": "0.19.4", + "@esbuild/linux-loong64": "0.19.4", + "@esbuild/linux-mips64el": "0.19.4", + "@esbuild/linux-ppc64": "0.19.4", + "@esbuild/linux-riscv64": "0.19.4", + "@esbuild/linux-s390x": "0.19.4", + "@esbuild/linux-x64": "0.19.4", + "@esbuild/netbsd-x64": "0.19.4", + "@esbuild/openbsd-x64": "0.19.4", + "@esbuild/sunos-x64": "0.19.4", + "@esbuild/win32-arm64": "0.19.4", + "@esbuild/win32-ia32": "0.19.4", + "@esbuild/win32-x64": "0.19.4" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/ethers": { + "version": "6.11.1", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.11.1.tgz", + "integrity": "sha512-mxTAE6wqJQAbp5QAe/+o+rXOID7Nw91OZXvgpjDa1r4fAbq2Nu314oEZSbjoRLacuCzs7kUC3clEvkCQowffGg==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/ethers-io/" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@adraffy/ens-normalize": "1.10.1", + "@noble/curves": "1.2.0", + "@noble/hashes": "1.3.2", + "@types/node": "18.15.13", + "aes-js": "4.0.0-beta.5", + "tslib": "2.4.0", + "ws": "8.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/ethers/node_modules/@noble/curves": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz", + "integrity": "sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==", + "dependencies": { + "@noble/hashes": "1.3.2" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/ethers/node_modules/@noble/hashes": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz", + "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/ethers/node_modules/@types/node": { + "version": "18.15.13", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.13.tgz", + "integrity": "sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q==" + }, + "node_modules/ethers/node_modules/tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" + }, + "node_modules/evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "dependencies": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "node_modules/express": { + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz", + "integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.2", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.6.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.2.0", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.7", + "qs": "6.11.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.18.0", + "serve-static": "1.15.0", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/finalhandler": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fs-extra": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.1.tgz", + "integrity": "sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag==", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-prop": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/get-prop/-/get-prop-0.0.10.tgz", + "integrity": "sha512-XRSGBgcIisSMLJ/dwe1y/eMm9yzLicEJKmEXA3ArBkDkCW2nyRroLOoKIz+SdxuG5SI7ym2QHaTU5ifCl7MTDg==" + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hash-base": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "dependencies": { + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/hash-of-directory": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hash-of-directory/-/hash-of-directory-1.0.1.tgz", + "integrity": "sha512-PX6VaxD6JK8R4113ChdTtEnWIo2XA9mz4yrtGBuUGUKtWCj6iWWYj/qwjdfs3Zgm+FdiNj0Vmt4VwPlwxx8WHw==" + }, + "node_modules/hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/hdkey": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/hdkey/-/hdkey-2.1.0.tgz", + "integrity": "sha512-i9Wzi0Dy49bNS4tXXeGeu0vIcn86xXdPQUpEYg+SO1YiO8HtomjmmRMaRyqL0r59QfcD4PfVbSF3qmsWFwAemA==", + "dependencies": { + "bs58check": "^2.1.2", + "ripemd160": "^2.0.2", + "safe-buffer": "^5.1.1", + "secp256k1": "^4.0.0" + } + }, + "node_modules/hdkey/node_modules/base-x": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz", + "integrity": "sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/hdkey/node_modules/bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", + "dependencies": { + "base-x": "^3.0.2" + } + }, + "node_modules/hdkey/node_modules/bs58check": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", + "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", + "dependencies": { + "bs58": "^4.0.0", + "create-hash": "^1.1.0", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", + "dependencies": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/http-message-parser": { + "version": "0.0.34", + "resolved": "https://registry.npmjs.org/http-message-parser/-/http-message-parser-0.0.34.tgz", + "integrity": "sha512-KABKXT347AYvQoaMZg9/K+/GqW6gfB4pKCiTyMUYnosfkdkaBkrXE/cWGSLk5jvD5tiDeLFlYSHLhhPhQKbRrA==", + "dependencies": { + "buffer": "^4.9.1", + "concat-stream": "^1.5.1", + "get-prop": "0.0.10", + "minimist": "^1.2.0", + "stream-buffers": "^3.0.0" + }, + "bin": { + "http-message-parser": "bin/http-message-parser.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/http-message-parser/node_modules/buffer": { + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", + "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", + "dependencies": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "engines": { + "node": ">=0.12.0" + } + }, + "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/iso-url": { + "version": "0.4.7", + "resolved": "https://registry.npmjs.org/iso-url/-/iso-url-0.4.7.tgz", + "integrity": "sha512-27fFRDnPAMnHGLq36bWTpKET+eiXct3ENlCcdcMdk+mjXrb2kw3mhBUg1B7ewAC0kVzlOPhADzQgz1SE6Tglog==", + "engines": { + "node": ">=10" + } + }, + "node_modules/js-sha256": { + "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==" + }, + "node_modules/json-text-sequence": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/json-text-sequence/-/json-text-sequence-0.1.1.tgz", + "integrity": "sha512-L3mEegEWHRekSHjc7+sc8eJhba9Clq1PZ8kMkzf8OxElhXc8O4TS5MwcVlj9aEbm5dr81N90WHC5nAz3UO971w==", + "dependencies": { + "delimit-stream": "0.1.0" + } + }, + "node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==" + }, + "node_modules/md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "dependencies": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + }, + "bin": { + "miller-rabin": "bin/miller-rabin" + } + }, + "node_modules/miller-rabin/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "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/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", "engines": { - "node": ">= 0.4.0" + "node": ">= 0.6" } }, - "node_modules/has-property-descriptors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", - "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "dependencies": { - "get-intrinsic": "^1.1.1" + "mime-db": "1.52.0" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">= 0.6" } }, - "node_modules/has-proto": { + "node_modules/minimalistic-assert": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", - "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", - "engines": { - "node": ">= 0.4" - }, + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + }, + "node_modules/minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==" + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">= 0.6" } }, - "node_modules/has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", - "dependencies": { - "has-symbols": "^1.0.2" - }, + "node_modules/net": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/net/-/net-1.0.2.tgz", + "integrity": "sha512-kbhcj2SVVR4caaVnGLJKmlk2+f+oLkjqdKeQlmUtz6nGzOpbcobwVIeSURNgraV/v3tlmGIX82OcPCl0K6RbHQ==" + }, + "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/node-gyp-build": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.0.tgz", + "integrity": "sha512-u6fs2AEUljNho3EYTJNBfImO5QTo/J/1Etd+NVdCj7qWKUSN/bSLkZwhDv7I+w/MSC6qJ4cknepkAYykDdK8og==", + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "engines": { - "node": ">= 0.4" - }, + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", + "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/hash-base": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", - "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", "dependencies": { - "inherits": "^2.0.4", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" + "ee-first": "1.1.1" }, "engines": { - "node": ">=4" + "node": ">= 0.8" } }, - "node_modules/hex-array": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/hex-array/-/hex-array-1.0.0.tgz", - "integrity": "sha512-dbjcApZ+RBr2DYCqs2gab5So6q4rM5VBqFg8oeOPc/s8PzrD48pf4w9e7DC4G+Gq4CEkHYQxqn7uYAQZKVWo8w==" + "node_modules/pako": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz", + "integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==" }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] + "node_modules/parse-asn1": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", + "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", + "dependencies": { + "asn1.js": "^5.2.0", + "browserify-aes": "^1.0.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3", + "safe-buffer": "^5.1.1" + } }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "engines": { + "node": ">= 0.8" + } }, - "node_modules/is-arguments": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", - "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", + "node_modules/path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" + }, + "node_modules/pbkdf2": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", + "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=0.12" } }, - "node_modules/is-callable": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", - "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "engines": { - "node": ">= 0.4" + "node": ">=8.6" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/is-generator-function": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", - "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", "dependencies": { - "has-tostringtag": "^1.0.0" + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">= 0.10" } }, - "node_modules/is-nan": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/is-nan/-/is-nan-1.3.2.tgz", - "integrity": "sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==", + "node_modules/public-encrypt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", + "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", "dependencies": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3" - }, + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/public-encrypt/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "node_modules/pvtsutils": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.3.5.tgz", + "integrity": "sha512-ARvb14YB9Nm2Xi6nBq1ZX6dAM0FsJnuk+31aUp4TrcZEdKUlSqOqsxJHUPJDNE3qiIp+iUPEIeR6Je/tgV7zsA==", + "dependencies": { + "tslib": "^2.6.1" + } + }, + "node_modules/pvutils": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/pvutils/-/pvutils-1.1.3.tgz", + "integrity": "sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ==", "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=6.0.0" } }, - "node_modules/is-typed-array": { - "version": "1.1.10", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz", - "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", + "node_modules/qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0" + "side-channel": "^1.0.4" }, "engines": { - "node": ">= 0.4" + "node": ">=0.6" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/iso-url": { - "version": "0.4.7", - "resolved": "https://registry.npmjs.org/iso-url/-/iso-url-0.4.7.tgz", - "integrity": "sha512-27fFRDnPAMnHGLq36bWTpKET+eiXct3ENlCcdcMdk+mjXrb2kw3mhBUg1B7ewAC0kVzlOPhADzQgz1SE6Tglog==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/js-sha256": { - "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==" - }, - "node_modules/json-text-sequence": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/json-text-sequence/-/json-text-sequence-0.1.1.tgz", - "integrity": "sha512-L3mEegEWHRekSHjc7+sc8eJhba9Clq1PZ8kMkzf8OxElhXc8O4TS5MwcVlj9aEbm5dr81N90WHC5nAz3UO971w==", - "dev": true, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dependencies": { - "delimit-stream": "0.1.0" + "safe-buffer": "^5.1.0" } }, - "node_modules/jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "node_modules/randomfill": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" } }, - "node_modules/make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==" - }, - "node_modules/object-is": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", - "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">= 0.6" } }, - "node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "node_modules/raw-body": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, "engines": { - "node": ">= 0.4" + "node": ">= 0.8" } }, "node_modules/readable-stream": { @@ -1259,6 +2583,17 @@ "node": ">= 6" } }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, "node_modules/ripemd160": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", @@ -1287,11 +2622,137 @@ } ] }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/secp256k1": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.3.tgz", + "integrity": "sha512-NLZVf+ROMxwtEj3Xa562qgv2BK5e2WNmXPiOdVIPLgs6lyTzMvBq0aWTYMI5XCP9jZMVKOcqZLw/Wc4vDkuxhA==", + "hasInstallScript": true, + "dependencies": { + "elliptic": "^6.5.4", + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/send": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/serve-static": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "dependencies": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.18.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, + "node_modules/sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + }, + "bin": { + "sha.js": "bin.js" + } + }, + "node_modules/side-channel": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/simple-cbor": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/simple-cbor/-/simple-cbor-0.4.1.tgz", - "integrity": "sha512-rijcxtwx2b4Bje3sqeIqw5EeW7UlOIC4YfOdwqIKacpvRQ/D78bWg/4/0m5e0U91oKvlGh7LlJuZCu07ISCC7w==", - "dev": true + "integrity": "sha512-rijcxtwx2b4Bje3sqeIqw5EeW7UlOIC4YfOdwqIKacpvRQ/D78bWg/4/0m5e0U91oKvlGh7LlJuZCu07ISCC7w==" + }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/stream-buffers": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/stream-buffers/-/stream-buffers-3.0.2.tgz", + "integrity": "sha512-DQi1h8VEBA/lURbSwFtEHnSTb9s2/pwLEaFuNhXwy1Dx3Sa0lOuYT2yNUr4/j2fs8oCAMANtrZ5OrPZtyVs3MQ==", + "engines": { + "node": ">= 0.10.0" + } }, "node_modules/string_decoder": { "version": "1.3.0", @@ -1301,13 +2762,38 @@ "safe-buffer": "~5.2.0" } }, + "node_modules/text-encoding": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/text-encoding/-/text-encoding-0.7.0.tgz", + "integrity": "sha512-oJQ3f1hrOnbRLOcwKz0Liq2IcrvDeZRHXhd9RgLrsT+DjWY/nty1Hi7v3dtkaEYbPYe0mUoOfzRrMwfXXwgPUA==", + "deprecated": "no longer maintained" + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "engines": { + "node": ">=0.6" + } + }, "node_modules/ts-node": { - "version": "10.7.0", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.7.0.tgz", - "integrity": "sha512-TbIGS4xgJoX2i3do417KSaep1uRAW/Lu+WAL2doDHC0D6ummjirVOXU5/7aiZotbQ5p1Zp9tP7U6cYhA0O7M8A==", + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", + "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", "dev": true, "dependencies": { - "@cspotcode/source-map-support": "0.7.0", + "@cspotcode/source-map-support": "^0.8.0", "@tsconfig/node10": "^1.0.7", "@tsconfig/node12": "^1.0.7", "@tsconfig/node14": "^1.0.0", @@ -1318,7 +2804,7 @@ "create-require": "^1.1.0", "diff": "^4.0.1", "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.0", + "v8-compile-cache-lib": "^3.0.1", "yn": "3.1.1" }, "bin": { @@ -1344,17 +2830,55 @@ } } }, - "node_modules/typescript": { - "version": "4.6.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz", - "integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==", + "node_modules/ts-node/node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==" + }, + "node_modules/typeforce": { + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/typeforce/-/typeforce-1.18.0.tgz", + "integrity": "sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g==" + }, + "node_modules/typescript": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", + "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { - "node": ">=4.2.0" + "node": ">=14.17" } }, "node_modules/universalify": { @@ -1365,16 +2889,12 @@ "node": ">= 10.0.0" } }, - "node_modules/util": { - "version": "0.12.5", - "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", - "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", - "dependencies": { - "inherits": "^2.0.3", - "is-arguments": "^1.0.4", - "is-generator-function": "^1.0.7", - "is-typed-array": "^1.1.3", - "which-typed-array": "^1.1.2" + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "engines": { + "node": ">= 0.8" } }, "node_modules/util-deprecate": { @@ -1382,29 +2902,66 @@ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/v8-compile-cache-lib": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", "dev": true }, - "node_modules/which-typed-array": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz", - "integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==", + "node_modules/varuint-bitcoin": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/varuint-bitcoin/-/varuint-bitcoin-1.1.2.tgz", + "integrity": "sha512-4EVb+w4rx+YfVM32HQX42AbbT7/1f5zwAYhIujKXKk8NQK+JfRVl3pqT3hjNn/L+RstigmGGKVwHA/P0wgITZw==", "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0", - "is-typed-array": "^1.1.10" - }, + "safe-buffer": "^5.1.1" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", "engines": { - "node": ">= 0.4" + "node": ">= 0.8" + } + }, + "node_modules/ws": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz", + "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==", + "engines": { + "node": ">=10.0.0" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } } }, "node_modules/yn": { diff --git a/examples/basic_bitcoin/package.json b/examples/basic_bitcoin/package.json index cda9784ae6..21d48d64a1 100644 --- a/examples/basic_bitcoin/package.json +++ b/examples/basic_bitcoin/package.json @@ -1,22 +1,18 @@ { "scripts": { + "install": "./scripts/install.sh", "pretest": "ts-node --transpile-only --ignore=false test/pretest.ts", "test": "ts-node --transpile-only --ignore=false test/test.ts" }, "dependencies": { - "assert": "2.0.0", - "azle": "0.16.3", - "bs58": "5.0.0", - "events": "3.3.0", - "hex-array": "1.0.0", - "js-sha256": "0.9.0", - "ripemd160": "2.0.2" + "azle": "^0.21.1", + "bitcoinjs-lib": "^6.1.5", + "express": "^4.18.2" }, "devDependencies": { - "@dfinity/agent": "0.11.1", - "@types/hex-array": "1.0.0", - "@types/ripemd160": "2.0.0", - "ts-node": "10.7.0", - "typescript": "4.6.3" + "@dfinity/agent": "^0.19.2", + "@types/express": "^4.17.21", + "ts-node": "^10.9.1", + "typescript": "^5.2.2" } } diff --git a/examples/basic_bitcoin/scripts/install.sh b/examples/basic_bitcoin/scripts/install.sh new file mode 100755 index 0000000000..a4d0f03526 --- /dev/null +++ b/examples/basic_bitcoin/scripts/install.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +mkdir -p .bitcoin/data + +# Check if bitcoind executable exists; if not, download and extract it +if [ ! -f ".bitcoin/bin/bitcoind" ]; then + curl -o bitcoin.tar.gz https://bitcoincore.org/bin/bitcoin-core-23.0/bitcoin-23.0-x86_64-linux-gnu.tar.gz + tar xzf bitcoin.tar.gz --overwrite --strip-components=1 --directory=.bitcoin/ bitcoin-23.0/bin/ + rm -rf bitcoin.tar.gz +fi diff --git a/examples/basic_bitcoin/src/bitcoin_api.ts b/examples/basic_bitcoin/src/bitcoin_api.ts index 6697e3a8ee..7ae7a8f50f 100644 --- a/examples/basic_bitcoin/src/bitcoin_api.ts +++ b/examples/basic_bitcoin/src/bitcoin_api.ts @@ -1,7 +1,4 @@ -// @ts-nocheck - -import { blob, ic, match, nat64, Opt, Vec } from 'azle'; -import { managementCanister } from 'azle/canisters/management'; +import { serialize } from 'azle'; import { BitcoinNetwork, GetUtxosResult, @@ -9,11 +6,11 @@ import { } from 'azle/canisters/management/bitcoin'; // The fees for the various bitcoin endpoints. -const GET_BALANCE_COST_CYCLES: nat64 = 100_000_000n; -const GET_UTXOS_COST_CYCLES: nat64 = 10_000_000_000n; -const GET_CURRENT_FEE_PERCENTILES_CYCLES: nat64 = 100_000_000n; -const SEND_TRANSACTION_BASE_CYCLES: nat64 = 5_000_000_000n; -const SEND_TRANSACTION_PER_BYTE_CYCLES: nat64 = 20_000_000n; +const GET_BALANCE_COST_CYCLES: bigint = 100_000_000n; +const GET_UTXOS_COST_CYCLES: bigint = 10_000_000_000n; +const GET_CURRENT_FEE_PERCENTILES_CYCLES: bigint = 100_000_000n; +const SEND_TRANSACTION_BASE_CYCLES: bigint = 5_000_000_000n; +const SEND_TRANSACTION_PER_BYTE_CYCLES: bigint = 20_000_000n; /// Returns the balance of the given bitcoin address. /// @@ -22,45 +19,43 @@ const SEND_TRANSACTION_PER_BYTE_CYCLES: nat64 = 20_000_000n; export async function getBalance( network: BitcoinNetwork, address: string -): Promise { - const balanceRes = await managementCanister - .bitcoin_get_balance({ - address, - network, - min_confirmations: Opt.None +): Promise { + const balanceRes = await fetch(`icp://aaaaa-aa/bitcoin_get_balance`, { + body: serialize({ + args: [ + { + address, + min_confirmations: [], + network + } + ], + cycles: GET_BALANCE_COST_CYCLES }) - .cycles(GET_BALANCE_COST_CYCLES) - .call(); - - return match(balanceRes, { - Ok: (ok) => ok, - Err: (err) => ic.trap(err) }); + return await balanceRes.json(); } /// Returns the UTXOs of the given bitcoin address. /// -/// NOTE: Pagination is ignored in this example. If an address has many thousands -/// of UTXOs, then subsequent calls to `bitcoin_get_utxos` are required. -/// +/// NOTE: Relies on the `bitcoin_get_utxos` endpoint. /// See https://internetcomputer.org/docs/current/references/ic-interface-spec/#ic-bitcoin_get_utxos export async function getUtxos( network: BitcoinNetwork, address: string ): Promise { - const utxosRes = await managementCanister - .bitcoin_get_utxos({ - address, - network, - filter: Opt.None + const utxoRes = await fetch(`icp://aaaaa-aa/bitcoin_get_utxos`, { + body: serialize({ + args: [ + { + address, + filter: [], + network + } + ], + cycles: GET_UTXOS_COST_CYCLES }) - .cycles(GET_UTXOS_COST_CYCLES) - .call(); - - return match(utxosRes, { - Ok: (ok) => ok, - Err: (err) => ic.trap(err) }); + return await utxoRes.json(); } /// Returns the 100 fee percentiles measured in millisatoshi/byte. @@ -70,18 +65,21 @@ export async function getUtxos( /// See https://internetcomputer.org/docs/current/references/ic-interface-spec/#ic-bitcoin_get_current_fee_percentiles export async function getCurrentFeePercentiles( network: BitcoinNetwork -): Promise> { - const res = await managementCanister - .bitcoin_get_current_fee_percentiles({ - network - }) - .cycles(GET_CURRENT_FEE_PERCENTILES_CYCLES) - .call(); - - return match(res, { - Ok: (ok) => ok, - Err: (err) => ic.trap(err) - }); +): Promise { + const res = await fetch( + `icp://aaaaa-aa/bitcoin_get_current_fee_percentiles`, + { + body: serialize({ + args: [ + { + network + } + ], + cycles: GET_CURRENT_FEE_PERCENTILES_CYCLES + }) + } + ); + return await res.json(); } /// Sends a (signed) transaction to the bitcoin network. @@ -90,22 +88,21 @@ export async function getCurrentFeePercentiles( /// See https://internetcomputer.org/docs/current/references/ic-interface-spec/#ic-bitcoin_send_transaction export async function sendTransaction( network: BitcoinNetwork, - transaction: blob + transaction: Uint8Array ): Promise { const transactionFee = SEND_TRANSACTION_BASE_CYCLES + BigInt(transaction.length) * SEND_TRANSACTION_PER_BYTE_CYCLES; - const res = await managementCanister - .bitcoin_send_transaction({ - network, - transaction + await fetch(`icp://aaaaa-aa/bitcoin_send_transaction`, { + body: serialize({ + args: [ + { + transaction, + network + } + ], + cycles: transactionFee }) - .cycles(transactionFee) - .call(); - - return match(res, { - Ok: (ok) => ok, - Err: (err) => ic.trap(err) }); } diff --git a/examples/basic_bitcoin/src/bitcoin_plugin/Cargo.toml b/examples/basic_bitcoin/src/bitcoin_plugin/Cargo.toml deleted file mode 100644 index 2c11138344..0000000000 --- a/examples/basic_bitcoin/src/bitcoin_plugin/Cargo.toml +++ /dev/null @@ -1,3 +0,0 @@ -[dependencies] -bitcoin = "0.28.1" -boa_gc = { git = "https://github.com/boa-dev/boa", rev = "08a72387ba5cd185f657e98d984ff2ce328da69e" } diff --git a/examples/basic_bitcoin/src/bitcoin_plugin/index.ts b/examples/basic_bitcoin/src/bitcoin_plugin/index.ts deleted file mode 100644 index 4620517d80..0000000000 --- a/examples/basic_bitcoin/src/bitcoin_plugin/index.ts +++ /dev/null @@ -1,172 +0,0 @@ -// @ts-nocheck - -import { blob, int32, nat32, nat64, registerPlugin, Vec } from 'azle'; - -export type BitcoinAddress = { - script_pubkey: () => BitcoinScript; -}; - -export const BitcoinAddress = { - from_str: (string: string) => { - return (globalThis as any).BitcoinPlugin.BitcoinAddress.from_str( - string - ) as BitcoinAddress; - } -}; - -export type BitcoinHash = { - from_slice: (_: blob) => BitcoinHash; -}; - -export const BitcoinHash = { - from_slice: (slice: blob) => { - return (globalThis as any).BitcoinPlugin.BitcoinHash.from_slice( - slice - ) as BitcoinHash; - } -}; - -export type BitcoinOutPoint = { - new: (txid: BitcoinTxid, vout: nat32) => BitcoinOutPoint; -}; - -export const BitcoinOutPoint = { - new: (txid: BitcoinTxid, vout: nat32) => { - return (globalThis as any).BitcoinPlugin.BitcoinOutPoint.new( - txid, - vout - ) as BitcoinOutPoint; - } -}; - -export type BitcoinSighash = { - to_vec: () => blob; -}; - -export type BitcoinScript = { - new: () => BitcoinScript; -}; - -export const BitcoinScript = { - new: () => { - return ( - globalThis as any - ).BitcoinPlugin.BitcoinScript.new() as BitcoinScript; - } -}; - -export type BitcoinScriptBuilder = { - into_script: () => BitcoinScript; - new: () => BitcoinScriptBuilder; - push_slice: (_: blob) => BitcoinScriptBuilder; -}; - -export const BitcoinScriptBuilder = { - new: () => { - return ( - globalThis as any - ).BitcoinPlugin.BitcoinScriptBuilder.new() as BitcoinScriptBuilder; - } -}; - -export type BitcoinTransaction = { - inputs: Vec; - lock_time: nat32; - version: int32; - outputs: Vec; - prepare_script_sig: (index: nat32, script: BitcoinScript) => void; - serialize: () => blob; - signature_hash: ( - input_index: nat32, - script_pubkey: BitcoinScript, - sighash_u32: nat32 - ) => BitcoinSighash; - txid: () => BitcoinTxid; -}; - -export const BitcoinTransaction = { - new: ( - inputs: BitcoinTransaction['inputs'], - lock_time: BitcoinTransaction['lock_time'], - version: BitcoinTransaction['version'], - outputs: BitcoinTransaction['outputs'] - ) => { - return (globalThis as any).BitcoinPlugin.BitcoinTransaction.new( - inputs, - lock_time, - version, - outputs - ) as BitcoinTransaction; - } -}; - -export type BitcoinTxid = { - from_hash: (hash: BitcoinHash) => BitcoinTxid; - to_string: () => string; -}; - -export const BitcoinTxid = { - from_hash: (hash: BitcoinHash) => { - return (globalThis as any).BitcoinPlugin.BitcoinTxid.from_hash( - hash - ) as BitcoinTxid; - } -}; - -export type BitcoinTxIn = { - witness: BitcoinWitness; // TODO we need these to be setters or accessors or something - new: ( - previous_output: BitcoinOutPoint, - sequence: nat32, - witness: BitcoinWitness, - script_sig: BitcoinScript - ) => BitcoinTxIn; - set_script_sig: (script_sig: BitcoinScript) => void; -}; - -export const BitcoinTxIn = { - new: ( - previous_output: BitcoinOutPoint, - script_sig: BitcoinScript, - sequence: nat32, - witness: BitcoinWitness - ) => { - return (globalThis as any).BitcoinPlugin.BitcoinTxIn.new( - previous_output, - script_sig, - sequence, - witness - ) as BitcoinTxIn; - } -}; - -export type BitcoinTxOut = { - new: (value: nat64, script_pubkey: BitcoinScript) => BitcoinTxOut; -}; - -export const BitcoinTxOut = { - new: (value: nat64, script_pubkey: BitcoinScript) => { - return (globalThis as any).BitcoinPlugin.BitcoinTxOut.new( - value, - script_pubkey - ) as BitcoinTxOut; - } -}; - -export type BitcoinWitness = { - clear: () => void; - new: () => BitcoinWitness; -}; - -export const BitcoinWitness = { - new: () => { - return ( - globalThis as any - ).BitcoinPlugin.BitcoinWitness.new() as BitcoinWitness; - } -}; - -registerPlugin({ - globalObjectName: 'BitcoinPlugin', - rustRegisterFunctionName: '_bitcoin_plugin_register' -}); diff --git a/examples/basic_bitcoin/src/bitcoin_plugin/src/lib.rs b/examples/basic_bitcoin/src/bitcoin_plugin/src/lib.rs deleted file mode 100644 index c2aabb5719..0000000000 --- a/examples/basic_bitcoin/src/bitcoin_plugin/src/lib.rs +++ /dev/null @@ -1,852 +0,0 @@ -use bitcoin::hashes::Hash; -use bitcoin::psbt::serialize::Serialize; -use boa_engine::object::NativeObject; - -fn _bitcoin_plugin_register(boa_context: &mut boa_engine::Context) { - let address = boa_engine::object::ObjectInitializer::new(boa_context) - .function( - boa_engine::NativeFunction::from_fn_ptr(_bitcoin_plugin_address_from_str), - "from_str", - 0, - ) - .build(); - - let hash = boa_engine::object::ObjectInitializer::new(boa_context) - .function( - boa_engine::NativeFunction::from_fn_ptr(_bitcoin_plugin_hash_from_slice), - "from_slice", - 0, - ) - .build(); - - let out_point = boa_engine::object::ObjectInitializer::new(boa_context) - .function( - boa_engine::NativeFunction::from_fn_ptr(_bitcoin_plugin_out_point_new), - "new", - 0, - ) - .build(); - - let script = boa_engine::object::ObjectInitializer::new(boa_context) - .function( - boa_engine::NativeFunction::from_fn_ptr(_bitcoin_plugin_script_new), - "new", - 0, - ) - .build(); - - let script_builder = boa_engine::object::ObjectInitializer::new(boa_context) - .function( - boa_engine::NativeFunction::from_fn_ptr(_bitcoin_plugin_script_builder_new), - "new", - 0, - ) - .build(); - - let transaction = boa_engine::object::ObjectInitializer::new(boa_context) - .function( - boa_engine::NativeFunction::from_fn_ptr(_bitcoin_plugin_transaction_new), - "new", - 0, - ) - .build(); - - let txid = boa_engine::object::ObjectInitializer::new(boa_context) - .function( - boa_engine::NativeFunction::from_fn_ptr(_bitcoin_plugin_txid_from_hash), - "from_hash", - 0, - ) - .build(); - - let tx_in = boa_engine::object::ObjectInitializer::new(boa_context) - .function( - boa_engine::NativeFunction::from_fn_ptr(_bitcoin_plugin_tx_in_new), - "new", - 0, - ) - .build(); - - let tx_out = boa_engine::object::ObjectInitializer::new(boa_context) - .function( - boa_engine::NativeFunction::from_fn_ptr(_bitcoin_plugin_tx_out_new), - "new", - 0, - ) - .build(); - - let witness = boa_engine::object::ObjectInitializer::new(boa_context) - .function( - boa_engine::NativeFunction::from_fn_ptr(_bitcoin_plugin_witness_new), - "new", - 0, - ) - .build(); - - let bitcoin_plugin = boa_engine::object::ObjectInitializer::new(boa_context) - .property( - "BitcoinAddress", - address, - boa_engine::property::Attribute::all(), - ) - .property("BitcoinHash", hash, boa_engine::property::Attribute::all()) - .property( - "BitcoinOutPoint", - out_point, - boa_engine::property::Attribute::all(), - ) - .property( - "BitcoinScript", - script, - boa_engine::property::Attribute::all(), - ) - .property( - "BitcoinScriptBuilder", - script_builder, - boa_engine::property::Attribute::all(), - ) - .property( - "BitcoinTransaction", - transaction, - boa_engine::property::Attribute::all(), - ) - .property("BitcoinTxid", txid, boa_engine::property::Attribute::all()) - .property("BitcoinTxIn", tx_in, boa_engine::property::Attribute::all()) - .property( - "BitcoinTxOut", - tx_out, - boa_engine::property::Attribute::all(), - ) - .property( - "BitcoinWitness", - witness, - boa_engine::property::Attribute::all(), - ) - .build(); - - boa_context.register_global_property( - "BitcoinPlugin", - bitcoin_plugin, - boa_engine::property::Attribute::all(), - ); -} - -// address - -struct JsBitcoinAddress(bitcoin::Address); - -unsafe impl boa_gc::Trace for JsBitcoinAddress { - boa_gc::empty_trace!(); -} - -impl boa_gc::Finalize for JsBitcoinAddress {} - -fn _bitcoin_plugin_address_from_str( - this: &boa_engine::JsValue, - aargs: &[boa_engine::JsValue], - context: &mut boa_engine::Context, -) -> boa_engine::JsResult { - let arg0: String = aargs[0].clone().try_from_vm_value(&mut *context).unwrap(); - - let address = JsBitcoinAddress(bitcoin::Address::from_str(&arg0).unwrap()); - - let address_js_object = boa_engine::object::JsObject::from_proto_and_data( - context.intrinsics().constructors().object().prototype(), - boa_engine::object::ObjectData::native_object(address), - ); - - address_js_object - .set( - "script_pubkey", - boa_engine::object::FunctionObjectBuilder::new( - context, - boa_engine::NativeFunction::from_fn_ptr(_bitcoin_plugin_address_script_pubkey), - ) - .build(), - false, - context, - ) - .unwrap(); - - Ok(address_js_object.into()) -} - -fn _bitcoin_plugin_address_script_pubkey( - this: &boa_engine::JsValue, - aargs: &[boa_engine::JsValue], - context: &mut boa_engine::Context, -) -> boa_engine::JsResult { - let this_js_object = this.as_object().unwrap(); - let address = this_js_object.downcast_ref::().unwrap(); - - let bitcoin_script = JsBitcoinScript(address.0.script_pubkey()); - - let bitcoin_script_js_object = boa_engine::object::JsObject::from_proto_and_data( - context.intrinsics().constructors().object().prototype(), - boa_engine::object::ObjectData::native_object(bitcoin_script), - ); - - Ok(bitcoin_script_js_object.into()) -} - -// hash -struct JsBitcoinHash(bitcoin::hashes::sha256d::Hash); - -unsafe impl boa_gc::Trace for JsBitcoinHash { - boa_gc::empty_trace!(); -} - -impl boa_gc::Finalize for JsBitcoinHash {} - -fn _bitcoin_plugin_hash_from_slice( - this: &boa_engine::JsValue, - aargs: &[boa_engine::JsValue], - context: &mut boa_engine::Context, -) -> boa_engine::JsResult { - let arg0: Vec = aargs[0].clone().try_from_vm_value(&mut *context).unwrap(); - - let hash = JsBitcoinHash(bitcoin::hashes::sha256d::Hash::from_slice(&arg0).unwrap()); - - let hash_js_object = boa_engine::object::JsObject::from_proto_and_data( - context.intrinsics().constructors().object().prototype(), - boa_engine::object::ObjectData::native_object(hash), - ); - - Ok(hash_js_object.into()) -} - -// OutPoint -struct JsBitcoinOutPoint(bitcoin::OutPoint); - -unsafe impl boa_gc::Trace for JsBitcoinOutPoint { - boa_gc::empty_trace!(); -} - -impl boa_gc::Finalize for JsBitcoinOutPoint {} - -fn _bitcoin_plugin_out_point_new( - this: &boa_engine::JsValue, - aargs: &[boa_engine::JsValue], - context: &mut boa_engine::Context, -) -> boa_engine::JsResult { - let txid_js_object = aargs[0].as_object().unwrap(); - let txid = txid_js_object.downcast_ref::().unwrap(); - - let vout: u32 = aargs[1].clone().try_from_vm_value(&mut *context).unwrap(); - - let out_point = JsBitcoinOutPoint(bitcoin::OutPoint::new(txid.0, vout)); - - let out_point_js_object = boa_engine::object::JsObject::from_proto_and_data( - context.intrinsics().constructors().object().prototype(), - boa_engine::object::ObjectData::native_object(out_point), - ); - - Ok(out_point_js_object.into()) -} - -// script -struct JsBitcoinScript(bitcoin::Script); - -unsafe impl boa_gc::Trace for JsBitcoinScript { - boa_gc::empty_trace!(); -} - -impl boa_gc::Finalize for JsBitcoinScript {} - -fn _bitcoin_plugin_script_new( - this: &boa_engine::JsValue, - aargs: &[boa_engine::JsValue], - context: &mut boa_engine::Context, -) -> boa_engine::JsResult { - let script = JsBitcoinScript(bitcoin::Script::new()); - - let script_js_object = boa_engine::object::JsObject::from_proto_and_data( - context.intrinsics().constructors().object().prototype(), - boa_engine::object::ObjectData::native_object(script), - ); - - Ok(script_js_object.into()) -} - -// script_builder -struct JsBitcoinScriptBuilder(bitcoin::blockdata::script::Builder); - -unsafe impl boa_gc::Trace for JsBitcoinScriptBuilder { - boa_gc::empty_trace!(); -} - -impl boa_gc::Finalize for JsBitcoinScriptBuilder {} - -fn _bitcoin_plugin_script_builder_new( - this: &boa_engine::JsValue, - aargs: &[boa_engine::JsValue], - context: &mut boa_engine::Context, -) -> boa_engine::JsResult { - let script_builder = JsBitcoinScriptBuilder(bitcoin::blockdata::script::Builder::new()); - - let script_builder_js_object = boa_engine::object::JsObject::from_proto_and_data( - context.intrinsics().constructors().object().prototype(), - boa_engine::object::ObjectData::native_object(script_builder), - ); - - script_builder_js_object - .set( - "into_script", - boa_engine::object::FunctionObjectBuilder::new( - context, - boa_engine::NativeFunction::from_fn_ptr(_bitcoin_plugin_script_builder_into_script), - ) - .build(), - false, - context, - ) - .unwrap(); - - script_builder_js_object - .set( - "push_slice", - boa_engine::object::FunctionObjectBuilder::new( - context, - boa_engine::NativeFunction::from_fn_ptr(_bitcoin_plugin_script_builder_push_slice), - ) - .build(), - false, - context, - ) - .unwrap(); - - Ok(script_builder_js_object.into()) -} - -fn _bitcoin_plugin_script_builder_into_script( - this: &boa_engine::JsValue, - aargs: &[boa_engine::JsValue], - context: &mut boa_engine::Context, -) -> boa_engine::JsResult { - let this_js_object = this.as_object().unwrap(); - let script_builder = this_js_object - .downcast_ref::() - .unwrap(); - - let bitcoin_script = JsBitcoinScript(script_builder.0.clone().into_script()); - - let bitcoin_script_js_object = boa_engine::object::JsObject::from_proto_and_data( - context.intrinsics().constructors().object().prototype(), - boa_engine::object::ObjectData::native_object(bitcoin_script), - ); - - Ok(bitcoin_script_js_object.into()) -} - -fn _bitcoin_plugin_script_builder_push_slice( - this: &boa_engine::JsValue, - aargs: &[boa_engine::JsValue], - context: &mut boa_engine::Context, -) -> boa_engine::JsResult { - let this_js_object = this.as_object().unwrap(); - let script_builder = this_js_object - .downcast_ref::() - .unwrap(); - - let arg0: Vec = aargs[0].clone().try_from_vm_value(&mut *context).unwrap(); - - let bitcoin_script_builder = JsBitcoinScriptBuilder(script_builder.0.clone().push_slice(&arg0)); - - let bitcoin_script_builder_js_object = boa_engine::object::JsObject::from_proto_and_data( - context.intrinsics().constructors().object().prototype(), - boa_engine::object::ObjectData::native_object(bitcoin_script_builder), - ); - - bitcoin_script_builder_js_object - .set( - "into_script", - boa_engine::object::FunctionObjectBuilder::new( - context, - boa_engine::NativeFunction::from_fn_ptr(_bitcoin_plugin_script_builder_into_script), - ) - .build(), - false, - context, - ) - .unwrap(); - - bitcoin_script_builder_js_object - .set( - "push_slice", - boa_engine::object::FunctionObjectBuilder::new( - context, - boa_engine::NativeFunction::from_fn_ptr(_bitcoin_plugin_script_builder_push_slice), - ) - .build(), - false, - context, - ) - .unwrap(); - - Ok(bitcoin_script_builder_js_object.into()) -} - -// Sighash -struct JsBitcoinSighash(bitcoin::Sighash); - -unsafe impl boa_gc::Trace for JsBitcoinSighash { - boa_gc::empty_trace!(); -} - -impl boa_gc::Finalize for JsBitcoinSighash {} - -fn _bitcoin_plugin_sighash_to_vec( - this: &boa_engine::JsValue, - aargs: &[boa_engine::JsValue], - context: &mut boa_engine::Context, -) -> boa_engine::JsResult { - let this_js_object = this.as_object().unwrap(); - let sighash = &this_js_object.downcast_ref::().unwrap().0; - - Ok(sighash.to_vec().try_into_vm_value(&mut *context).unwrap()) -} - -// transaction -struct JsBitcoinTransaction(bitcoin::Transaction); - -unsafe impl boa_gc::Trace for JsBitcoinTransaction { - boa_gc::empty_trace!(); -} - -impl boa_gc::Finalize for JsBitcoinTransaction {} - -fn _bitcoin_plugin_transaction_new( - this: &boa_engine::JsValue, - aargs: &[boa_engine::JsValue], - context: &mut boa_engine::Context, -) -> boa_engine::JsResult { - let input = get_transaction_input(aargs[0].clone(), context); - let lock_time: u32 = aargs[1].clone().try_from_vm_value(&mut *context).unwrap(); - let version: i32 = aargs[2].clone().try_from_vm_value(&mut *context).unwrap(); - let output = get_transaction_output(aargs[3].clone(), context); - - let transaction = JsBitcoinTransaction(bitcoin::Transaction { - input, - lock_time, - version, - output, - }); - - let transaction_js_object = boa_engine::object::JsObject::from_proto_and_data( - context.intrinsics().constructors().object().prototype(), - boa_engine::object::ObjectData::native_object(transaction), - ); - - transaction_js_object - .set("inputs", aargs[0].clone(), false, context) - .unwrap(); - - transaction_js_object - .set( - "serialize", - boa_engine::object::FunctionObjectBuilder::new( - context, - boa_engine::NativeFunction::from_fn_ptr(_bitcoin_plugin_transaction_serialize), - ) - .build(), - false, - context, - ) - .unwrap(); - - transaction_js_object - .set( - "signature_hash", - boa_engine::object::FunctionObjectBuilder::new( - context, - boa_engine::NativeFunction::from_fn_ptr(_bitcoin_plugin_transaction_signature_hash), - ) - .build(), - false, - context, - ) - .unwrap(); - - transaction_js_object - .set( - "txid", - boa_engine::object::FunctionObjectBuilder::new( - context, - boa_engine::NativeFunction::from_fn_ptr(_bitcoin_plugin_transaction_txid), - ) - .build(), - false, - context, - ) - .unwrap(); - - transaction_js_object - .set( - "prepare_script_sig", - boa_engine::object::FunctionObjectBuilder::new( - context, - boa_engine::NativeFunction::from_copy_closure( - |this: &boa_engine::JsValue, - aargs: &[boa_engine::JsValue], - context: &mut boa_engine::Context| { - let this_js_object = this.as_object().unwrap(); - let transaction = &mut this_js_object - .downcast_mut::() - .unwrap() - .0; - - let index: u32 = aargs[0].clone().try_from_vm_value(&mut *context).unwrap(); - - let script_js_object = aargs[1].as_object().unwrap(); - let script = &script_js_object - .downcast_ref::() - .unwrap() - .0; - - let mut input = &mut transaction.input[index as usize]; - - input.script_sig = script.clone(); - - input.witness.clear(); - - Ok(boa_engine::JsValue::Undefined) - }, - ), - ) - .build(), - false, - context, - ) - .unwrap(); - - Ok(transaction_js_object.into()) -} - -fn _bitcoin_plugin_transaction_serialize( - this: &boa_engine::JsValue, - aargs: &[boa_engine::JsValue], - context: &mut boa_engine::Context, -) -> boa_engine::JsResult { - let this_js_object = this.as_object().unwrap(); - let transaction = &this_js_object - .downcast_ref::() - .unwrap() - .0; - - let serialized_transaction = transaction.serialize().try_into_vm_value(context).unwrap(); - - Ok(serialized_transaction) -} - -fn _bitcoin_plugin_transaction_signature_hash( - this: &boa_engine::JsValue, - aargs: &[boa_engine::JsValue], - context: &mut boa_engine::Context, -) -> boa_engine::JsResult { - let this_js_object = this.as_object().unwrap(); - let transaction = &this_js_object - .downcast_ref::() - .unwrap() - .0; - - let input_index: u32 = aargs[0].clone().try_from_vm_value(&mut *context).unwrap(); - - let script_pubkey_js_object = aargs[1].as_object().unwrap(); - let script_pubkey = &script_pubkey_js_object - .downcast_ref::() - .unwrap() - .0; - - let sighash_u32: u32 = aargs[2].clone().try_from_vm_value(&mut *context).unwrap(); - - let sighash = JsBitcoinSighash(transaction.signature_hash( - input_index as usize, - &script_pubkey, - sighash_u32, - )); - - let sighash_js_object = boa_engine::object::JsObject::from_proto_and_data( - context.intrinsics().constructors().object().prototype(), - boa_engine::object::ObjectData::native_object(sighash), - ); - - sighash_js_object - .set( - "to_vec", - boa_engine::object::FunctionObjectBuilder::new( - context, - boa_engine::NativeFunction::from_fn_ptr(_bitcoin_plugin_sighash_to_vec), - ) - .build(), - false, - context, - ) - .unwrap(); - - Ok(sighash_js_object.into()) -} - -fn _bitcoin_plugin_transaction_txid( - this: &boa_engine::JsValue, - aargs: &[boa_engine::JsValue], - context: &mut boa_engine::Context, -) -> boa_engine::JsResult { - let this_js_object = this.as_object().unwrap(); - let transaction = &this_js_object - .downcast_ref::() - .unwrap() - .0; - - let txid = JsBitcoinTxid(transaction.txid()); - - let txid_js_object = boa_engine::object::JsObject::from_proto_and_data( - context.intrinsics().constructors().object().prototype(), - boa_engine::object::ObjectData::native_object(txid), - ); - - txid_js_object - .set( - "to_string", - boa_engine::object::FunctionObjectBuilder::new( - context, - boa_engine::NativeFunction::from_copy_closure( - |this: &boa_engine::JsValue, - aargs: &[boa_engine::JsValue], - context: &mut boa_engine::Context| { - let this_js_object = this.as_object().unwrap(); - let tx_id = &this_js_object.downcast_mut::().unwrap().0; - - let string = tx_id.to_string(); - - Ok(string.into()) - }, - ), - ) - .build(), - false, - context, - ) - .unwrap(); - - Ok(txid_js_object.into()) -} - -fn get_transaction_input( - input_js_value: boa_engine::JsValue, - context: &mut boa_engine::Context, -) -> Vec { - let input_js_object = input_js_value.as_object().unwrap(); - - let mut processing: bool = true; - let mut index: usize = 0; - - let mut result = vec![]; - - while processing == true { - let item_js_value = input_js_object.get(index, context).unwrap(); - - if item_js_value.is_undefined() { - processing = false; - } else { - let tx_in_js_object = item_js_value.as_object().unwrap(); - let tx_in = &tx_in_js_object.downcast_ref::().unwrap().0; - - result.push(tx_in.clone()); - index += 1; - } - } - - result -} - -fn get_transaction_output( - output_js_value: boa_engine::JsValue, - context: &mut boa_engine::Context, -) -> Vec { - let output_js_object = output_js_value.as_object().unwrap(); - - let mut processing: bool = true; - let mut index: usize = 0; - - let mut result = vec![]; - - while processing == true { - let item_js_value = output_js_object.get(index, context).unwrap(); - - if item_js_value.is_undefined() { - processing = false; - } else { - let tx_out_js_object = item_js_value.as_object().unwrap(); - let tx_out = &tx_out_js_object.downcast_ref::().unwrap().0; - - result.push(tx_out.clone()); - index += 1; - } - } - - result -} - -// txid -struct JsBitcoinTxid(bitcoin::Txid); - -unsafe impl boa_gc::Trace for JsBitcoinTxid { - boa_gc::empty_trace!(); -} - -impl boa_gc::Finalize for JsBitcoinTxid {} - -fn _bitcoin_plugin_txid_from_hash( - this: &boa_engine::JsValue, - aargs: &[boa_engine::JsValue], - context: &mut boa_engine::Context, -) -> boa_engine::JsResult { - let hash_js_object = aargs[0].as_object().unwrap(); - let hash = hash_js_object.downcast_ref::().unwrap(); - - let txid = JsBitcoinTxid(bitcoin::hash_types::Txid::from_hash(hash.0)); - - let txid_js_object = boa_engine::object::JsObject::from_proto_and_data( - context.intrinsics().constructors().object().prototype(), - boa_engine::object::ObjectData::native_object(txid), - ); - - Ok(txid_js_object.into()) -} - -// txin -struct JsBitcoinTxIn(bitcoin::TxIn); - -unsafe impl boa_gc::Trace for JsBitcoinTxIn { - boa_gc::empty_trace!(); -} - -impl boa_gc::Finalize for JsBitcoinTxIn {} - -fn _bitcoin_plugin_tx_in_new( - this: &boa_engine::JsValue, - aargs: &[boa_engine::JsValue], - context: &mut boa_engine::Context, -) -> boa_engine::JsResult { - let previous_output_js_object = aargs[0].as_object().unwrap(); - let previous_output = previous_output_js_object - .downcast_ref::() - .unwrap() - .0; - - let script_sig_js_object = aargs[1].as_object().unwrap(); - let script_sig = script_sig_js_object - .downcast_ref::() - .unwrap() - .0 - .clone(); - - let sequence: u32 = aargs[2].clone().try_from_vm_value(&mut *context).unwrap(); - - let witness_js_object = aargs[3].as_object().unwrap(); - let witness = witness_js_object - .downcast_ref::() - .unwrap() - .0 - .clone(); - - let tx_in = JsBitcoinTxIn(bitcoin::TxIn { - previous_output, - script_sig, - sequence, - witness, - }); - - let tx_in_js_object = boa_engine::object::JsObject::from_proto_and_data( - context.intrinsics().constructors().object().prototype(), - boa_engine::object::ObjectData::native_object(tx_in), - ); - - Ok(tx_in_js_object.into()) -} - -// txout -struct JsBitcoinTxOut(bitcoin::TxOut); - -unsafe impl boa_gc::Trace for JsBitcoinTxOut { - boa_gc::empty_trace!(); -} - -impl boa_gc::Finalize for JsBitcoinTxOut {} - -fn _bitcoin_plugin_tx_out_new( - this: &boa_engine::JsValue, - aargs: &[boa_engine::JsValue], - context: &mut boa_engine::Context, -) -> boa_engine::JsResult { - let value: u64 = aargs[0].clone().try_from_vm_value(&mut *context).unwrap(); - - let script_pubkey_js_object = aargs[1].as_object().unwrap(); - let script_pubkey = script_pubkey_js_object - .downcast_ref::() - .unwrap() - .0 - .clone(); - - let tx_out = JsBitcoinTxOut(bitcoin::TxOut { - value, - script_pubkey, - }); - - let tx_out_js_object = boa_engine::object::JsObject::from_proto_and_data( - context.intrinsics().constructors().object().prototype(), - boa_engine::object::ObjectData::native_object(tx_out), - ); - - Ok(tx_out_js_object.into()) -} - -// witness -struct JsBitcoinWitness(bitcoin::blockdata::witness::Witness); - -unsafe impl boa_gc::Trace for JsBitcoinWitness { - boa_gc::empty_trace!(); -} - -impl boa_gc::Finalize for JsBitcoinWitness {} - -fn _bitcoin_plugin_witness_new( - this: &boa_engine::JsValue, - aargs: &[boa_engine::JsValue], - context: &mut boa_engine::Context, -) -> boa_engine::JsResult { - let witness = JsBitcoinWitness(bitcoin::blockdata::witness::Witness::new()); - - let witness_js_object = boa_engine::object::JsObject::from_proto_and_data( - context.intrinsics().constructors().object().prototype(), - boa_engine::object::ObjectData::native_object(witness), - ); - - witness_js_object - .set( - "clear", - boa_engine::object::FunctionObjectBuilder::new( - context, - boa_engine::NativeFunction::from_fn_ptr(_bitcoin_plugin_witness_clear), - ) - .build(), - false, - context, - ) - .unwrap(); - - Ok(witness_js_object.into()) -} - -fn _bitcoin_plugin_witness_clear( - this: &boa_engine::JsValue, - aargs: &[boa_engine::JsValue], - context: &mut boa_engine::Context, -) -> boa_engine::JsResult { - let this_js_object = this.as_object().unwrap(); - let mut witness = &mut this_js_object.downcast_mut::().unwrap().0; - - witness.clear(); - - Ok(boa_engine::JsValue::Undefined) -} diff --git a/examples/basic_bitcoin/src/bitcoin_wallet.ts b/examples/basic_bitcoin/src/bitcoin_wallet.ts index 65d7d9bc28..2629faa63e 100644 --- a/examples/basic_bitcoin/src/bitcoin_wallet.ts +++ b/examples/basic_bitcoin/src/bitcoin_wallet.ts @@ -1,5 +1,3 @@ -// @ts-nocheck - //! A demo of a very bare-bones bitcoin "wallet". //! //! The wallet here showcases how bitcoin addresses can be be computed @@ -9,45 +7,38 @@ //! * Support for address types that aren't P2PKH. //! * Caching spent UTXOs so that they are not reused in future transactions. //! * Option to set the fee. -import { blob, ic, match, nat64, Result, Vec } from 'azle'; import { BitcoinNetwork, MillisatoshiPerByte, Satoshi, Utxo } from 'azle/canisters/management'; -import * as bs58 from 'bs58'; +import * as bitcoin from 'bitcoinjs-lib'; +import { Network, networks, Transaction } from 'bitcoinjs-lib'; import { Buffer } from 'buffer'; -import hexarray from 'hex-array'; -import { sha256 } from 'js-sha256'; -import RIPEMD160 from 'ripemd160'; import * as bitcoinApi from './bitcoin_api'; -import { - BitcoinAddress, - BitcoinHash, - BitcoinOutPoint, - BitcoinScript, - BitcoinScriptBuilder, - BitcoinTransaction, - BitcoinTxid, - BitcoinTxIn, - BitcoinTxOut, - BitcoinWitness -} from './bitcoin_plugin'; import * as ecdsaApi from './ecdsa_api'; +type SignFun = ( + keyName: string, + derivationPath: Uint8Array[], + messageHash: Uint8Array +) => Promise | Uint8Array; + +const SIG_HASH_TYPE = Transaction.SIGHASH_ALL; + /// Returns the P2PKH address of this canister at the given derivation path. -export async function getP2PKHAddress( +export async function getP2pkhAddress( network: BitcoinNetwork, keyName: string, - derivationPath: Vec + derivationPath: Uint8Array[] ): Promise { // Fetch the public key of the given derivation path. const publicKey = await ecdsaApi.ecdsaPublicKey(keyName, derivationPath); // Compute the address. - return publicKeyToP2PKHAddress(network, publicKey); + return publicKeyToP2pkhAddress(network, publicKey); } /// Sends a transaction to the network that transfers the given amount to the @@ -55,11 +46,11 @@ export async function getP2PKHAddress( /// at the given derivation path. export async function send( network: BitcoinNetwork, - derivationPath: Vec, + derivationPath: Uint8Array[], keyName: string, - dstAddressString: string, + dstAddress: string, amount: Satoshi -): Promise { +): Promise { // Get fee percentiles from previous transactions to estimate our own fee. const feePercentiles = await bitcoinApi.getCurrentFeePercentiles(network); @@ -70,19 +61,19 @@ export async function send( // we use a default of 2000 millisatoshis/byte (i.e. 2 satoshi/byte) 2_000n : // Choose the 50th percentile for sending fees. - feePercentiles[49]; + feePercentiles[50]; // Fetch our public key, P2PKH address, and UTXOs. const ownPublicKey = await ecdsaApi.ecdsaPublicKey(keyName, derivationPath); - const ownAddressString = publicKeyToP2PKHAddress(network, ownPublicKey); + const ownAddress = publicKeyToP2pkhAddress(network, ownPublicKey); - console.log('Fetching UTXOs...'); - const ownUtxos = (await bitcoinApi.getUtxos(network, ownAddressString)) + console.info('Fetching UTXOs...'); + // Note that pagination may have to be used to get all UTXOs for the given address. + // For the sake of simplicity, it is assumed here that the `utxo` field in the response + // contains all UTXOs. + const ownUtxos = (await bitcoinApi.getUtxos(network, ownAddress.toString())) .utxos; - const ownAddress = BitcoinAddress.from_str(ownAddressString); - const dstAddress = BitcoinAddress.from_str(dstAddressString); - // Build the transaction that sends `amount` to the destination address. const transaction = await buildTransaction( ownPublicKey, @@ -90,43 +81,45 @@ export async function send( ownUtxos, dstAddress, amount, - feePerByte + feePerByte, + network ); - const txBytes = transaction.serialize(); - console.log(`Transaction to sign: ${hexarray.toString(txBytes)}`); + console.info(`Transaction to sign: ${transaction.toHex()}`); - // Sign the transaction. const signedTransaction = await signTransaction( ownPublicKey, ownAddress, transaction, keyName, derivationPath, - ecdsaApi.signWithECDSA + ecdsaApi.signWithECDSA, + network ); - const signedTransactionBytes = signedTransaction.serialize(); - console.log(` - "Signed transaction: ${hexarray.toString(signedTransactionBytes)}`); + const signedTransactionBytes = signedTransaction.toBuffer(); + console.info( + `Signed transaction: ${signedTransactionBytes.toString('hex')}` + ); - console.log('Sending transaction...'); + console.info('Sending transaction...'); await bitcoinApi.sendTransaction(network, signedTransactionBytes); - console.log('Done'); + console.info('Done'); - return signedTransaction.txid(); + return signedTransaction.getId(); } // Builds a transaction to send the given `amount` of satoshis to the // destination address. async function buildTransaction( - ownPublicKey: blob, - ownAddress: BitcoinAddress, - ownUtxos: Vec, - dstAddress: BitcoinAddress, + ownPublicKey: Uint8Array, + ownAddress: string, + ownUtxos: Utxo[], + dstAddress: string, amount: Satoshi, - feePerByte: MillisatoshiPerByte -): Promise { + feePerByte: MillisatoshiPerByte, + network: BitcoinNetwork +): Promise { // We have a chicken-and-egg problem where we need to know the length // of the transaction in order to compute its proper fee, but we need // to know the proper fee in order to figure out the inputs needed for @@ -135,39 +128,35 @@ async function buildTransaction( // We solve this problem iteratively. We start with a fee of zero, build // and sign a transaction, see what its size is, and then update the fee, // rebuild the transaction, until the fee is set to the correct amount. - console.log('Building transaction...'); + console.info('Building transaction...'); let totalFee = 0n; // eslint-disable-next-line no-constant-condition while (true) { - const transaction = match( - buildTransactionWithFee( - ownUtxos, - ownAddress, - dstAddress, - amount, - totalFee - ), - { - Ok: (ok) => ok, - Err: () => ic.trap('Error building transaction.') - } + const transaction = buildTransactionWithFee( + ownUtxos, + ownAddress, + dstAddress, + amount, + totalFee, + network ); // Sign the transaction. In this case, we only care about the size - // of the signed transaction, so we use a mock signer here for efficiency. + // of the signed transaction. const signedTransaction = await signTransaction( ownPublicKey, ownAddress, - transaction, + transaction.clone(), '', // mock key name [], // mock derivation path - mockSigner + mockSigner, + network ); - const signedTxBytesLen = BigInt(signedTransaction.serialize().length); + const signedTxBytesLen = BigInt(signedTransaction.byteLength()); if ((signedTxBytesLen * feePerByte) / 1_000n === totalFee) { - console.log(`Transaction built with fee ${totalFee}.`); + console.info(`Transaction built with fee ${totalFee}.`); return transaction; } else { totalFee = (signedTxBytesLen * feePerByte) / 1_000n; @@ -176,20 +165,21 @@ async function buildTransaction( } function buildTransactionWithFee( - ownUtxos: Vec, - ownAddress: BitcoinAddress, - dstAddress: BitcoinAddress, - amount: nat64, - fee: nat64 -): Result { + ownUtxos: Utxo[], + ownAddress: string, + destAddress: string, + amount: bigint, + fee: bigint, + network: BitcoinNetwork +): Transaction { // Assume that any amount below this threshold is dust. - const DUST_THRESHOLD: nat64 = 1_000n; + const dustThreshold = 1_000n; // Select which UTXOs to spend. We naively spend the oldest available UTXOs, // even if they were previously spent in a transaction. This isn't a // problem as long as at most one transaction is created per block and // we're using min_confirmations of 1. - let utxosToSpend: Vec = []; + let utxosToSpend: Utxo[] = []; let totalSpent = 0n; for (const utxo of [...ownUtxos].reverse()) { totalSpent += utxo.value; @@ -201,36 +191,36 @@ function buildTransactionWithFee( } if (totalSpent < amount + fee) { - return Result.Err( + throw new Error( `Insufficient balance: ${totalSpent}, trying to transfer ${amount} satoshi with fee ${fee}` ); } - const inputs: Vec = utxosToSpend.map((utxo) => { - const txid = BitcoinTxid.from_hash( - BitcoinHash.from_slice(utxo.outpoint.txid) - ); - const previousOutput = BitcoinOutPoint.new(txid, utxo.outpoint.vout); - const scriptSig = BitcoinScript.new(); - const sequence = 0xffffffff; - const witness = BitcoinWitness.new(); + let transaction = new Transaction(); + transaction.version = 1; - return BitcoinTxIn.new(previousOutput, scriptSig, sequence, witness); - }); + for (const utxo of utxosToSpend) { + transaction.addInput( + Buffer.from(utxo.outpoint.txid), + utxo.outpoint.vout + ); + } - let outputs: Vec = [ - BitcoinTxOut.new(amount, dstAddress.script_pubkey()) - ]; + transaction.addOutput( + createScriptPubkey(destAddress, network), + Number(amount) + ); const remainingAmount = totalSpent - amount - fee; - if (remainingAmount >= DUST_THRESHOLD) { - outputs.push( - BitcoinTxOut.new(remainingAmount, ownAddress.script_pubkey()) + if (remainingAmount >= dustThreshold) { + transaction.addOutput( + createScriptPubkey(ownAddress, network), + Number(remainingAmount) ); } - return Result.Ok(BitcoinTransaction.new(inputs, 0, 1, outputs)); + return transaction; } // Sign a bitcoin transaction. @@ -241,100 +231,97 @@ function buildTransactionWithFee( // 1. All the inputs are referencing outpoints that are owned by `own_address`. // 2. `own_address` is a P2PKH address. async function signTransaction( - ownPublicKey: blob, - ownAddress: BitcoinAddress, - transaction: BitcoinTransaction, + ownPublicKey: Uint8Array, + ownAddress: string, + transaction: Transaction, keyName: string, - derivationPath: Vec, - signer: (_: string, __: Vec, ___: blob) => Promise -): Promise { - for (let index = 0; index < transaction.inputs.length; index++) { - const sighash = transaction.signature_hash( - index, - ownAddress.script_pubkey(), - 1 - ); + derivationPath: Uint8Array[], + signer: SignFun, + network: BitcoinNetwork +): Promise { + const addressVersion = bitcoin.address.fromBase58Check(ownAddress).version; + if ( + addressVersion !== bitcoin.networks.bitcoin.pubKeyHash && + addressVersion !== bitcoin.networks.testnet.pubKeyHash && + addressVersion !== bitcoin.networks.regtest.pubKeyHash + ) { + throw new Error('This example supports signing p2pkh addresses only.'); + } - const signature = await signer( - keyName, - derivationPath, - sighash.to_vec() + for (let i = 0; i < transaction.ins.length; i++) { + const sighash = transaction.hashForSignature( + i, + createScriptPubkey(ownAddress, network), + SIG_HASH_TYPE ); - // Convert signature to DER. - const derSignature = sec1ToDer(signature); + const signature = await signer(keyName, derivationPath, sighash); - const sigWithHashtype = Uint8Array.from([...derSignature, 1]); - - transaction.prepare_script_sig( - index, - BitcoinScriptBuilder.new() - .push_slice(sigWithHashtype) - .push_slice(ownPublicKey) - .into_script() + const encodedSig = bitcoin.script.signature.encode( + Buffer.from(signature), + SIG_HASH_TYPE ); + + const scriptSig = bitcoin.script.compile([ + encodedSig, + Buffer.from(ownPublicKey) + ]); + + transaction.setInputScript(i, Buffer.from(scriptSig)); } return transaction; } // Converts a public key to a P2PKH address. -function publicKeyToP2PKHAddress( +function publicKeyToP2pkhAddress( network: BitcoinNetwork, - publicKey: blob + publicKey: Uint8Array ): string { - // sha256 + ripmd160 - let hasher = new RIPEMD160(); - hasher.update(Buffer.from(sha256.digest(publicKey))); - const result = hasher.digest(); - const prefix = match(network, { - Mainnet: () => Buffer.from([0x00]), - _: () => Buffer.from([0x6f]) + const { address } = bitcoin.payments.p2pkh({ + pubkey: Buffer.from(publicKey), + network: determineNetwork(network) }); - const dataWithPrefix = Buffer.concat([prefix, result]); - const checksum = sha256.digest(sha256.digest(dataWithPrefix)).slice(0, 4); - const fullAddress = Buffer.concat([dataWithPrefix, Buffer.from(checksum)]); - return bs58.encode(fullAddress); + if (address === undefined) { + throw new Error('Unable to get address from the canister'); + } + return address; } // A mock for rubber-stamping ECDSA signatures. -async function mockSigner( - _key_name: string, - _derivation_path: Vec, - _message_hash: blob -): Promise { - return new Uint8Array(64).fill(255); +function mockSigner( + _keyName: string, + _derivationPath: Uint8Array[], + _messageHash: Uint8Array +): Uint8Array { + // bitcoin.script.signature.encode threw away most of the signature when it was all 0s so we need to fill it up with anything besides just 0s + return Uint8Array.from(new Array(64).fill(1)); } -// Converts a SEC1 ECDSA signature to the DER format. -function sec1ToDer(sec1Signature: blob): blob { - let r: blob; - - if ((sec1Signature[0] & 0x80) !== 0) { - // r is negative. Prepend a zero byte. - const tmp = Uint8Array.from([0x00, ...sec1Signature.slice(0, 32)]); - r = tmp; - } else { - // r is positive. - r = sec1Signature.slice(0, 32); +export function determineNetwork(network: BitcoinNetwork): Network { + if (network.mainnet === null) { + return networks.bitcoin; } - - let s: blob; - - if ((sec1Signature[32] & 0x80) !== 0) { - // s is negative. Prepend a zero byte. - const tmp = Uint8Array.from([0x00, ...sec1Signature.slice(32)]); - s = tmp; - } else { - // s is positive. - s = sec1Signature.slice(32); + if (network.testnet === null) { + return networks.testnet; } + if (network.regtest === null) { + return networks.regtest; + } + throw new Error(`Unknown Network: ${network}`); +} - // Convert signature to DER. - return Uint8Array.from([ - ...[0x30, 4 + r.length + s.length, 0x02, r.length], - ...r, - ...[0x02, s.length], - ...s +function createScriptPubkey(address: string, network: BitcoinNetwork): Buffer { + const pubKeyHash = bitcoin.address + .toOutputScript(address, determineNetwork(network)) + .subarray(3, 23); + const result = bitcoin.script.compile([ + bitcoin.opcodes.OP_DUP, + bitcoin.opcodes.OP_HASH160, + pubKeyHash, + bitcoin.opcodes.OP_EQUALVERIFY, + bitcoin.opcodes.OP_CHECKSIG ]); + + return result; } diff --git a/examples/basic_bitcoin/src/ecdsa_api.ts b/examples/basic_bitcoin/src/ecdsa_api.ts index 24aa9aa607..4bdfa080ae 100644 --- a/examples/basic_bitcoin/src/ecdsa_api.ts +++ b/examples/basic_bitcoin/src/ecdsa_api.ts @@ -1,55 +1,55 @@ -// @ts-nocheck +import { serialize } from 'azle'; -import { blob, ic, match, Opt, Vec } from 'azle'; -import { managementCanister } from 'azle/canisters/management'; +// The fee for the `sign_with_ecdsa` endpoint using the test key. +const SIGN_WITH_ECDSA_COST_CYCLES: bigint = 10_000_000_000n; /// Returns the ECDSA public key of this canister at the given derivation path. export async function ecdsaPublicKey( keyName: string, - derivationPath: Vec -): Promise { + derivationPath: Uint8Array[] +): Promise { // Retrieve the public key of this canister at the given derivation path // from the ECDSA API. - const res = await managementCanister - .ecdsa_public_key({ - canister_id: Opt.None, - derivation_path: derivationPath, - key_id: { - curve: { - secp256k1: null - }, - name: keyName - } + const response = await fetch('icp://aaaaa-aa/ecdsa_public_key', { + body: serialize({ + args: [ + { + canister_id: [], + derivation_path: derivationPath, + key_id: { + curve: { secp256k1: null }, + name: keyName + } + } + ] }) - .call(); - - return match(res, { - Ok: (ok) => ok.public_key, - Err: (err) => ic.trap(err) }); + const res = await response.json(); + + return res.public_key; } export async function signWithECDSA( keyName: string, - derivationPath: Vec, - messageHash: blob -): Promise { - const res = await managementCanister - .sign_with_ecdsa({ - message_hash: messageHash, - derivation_path: derivationPath, - key_id: { - curve: { - secp256k1: null - }, - name: keyName - } + derivationPath: Uint8Array[], + messageHash: Uint8Array +): Promise { + const publicKeyResponse = await fetch(`icp://aaaaa-aa/sign_with_ecdsa`, { + body: serialize({ + args: [ + { + message_hash: messageHash, + derivation_path: derivationPath, + key_id: { + curve: { secp256k1: null }, + name: keyName + } + } + ], + cycles: SIGN_WITH_ECDSA_COST_CYCLES }) - .cycles(10_000_000_000n) - .call(); - - return match(res, { - Ok: (ok) => ok.signature, - Err: (err) => ic.trap(err) }); + const res = await publicKeyResponse.json(); + + return res.signature; } diff --git a/examples/basic_bitcoin/src/index.did b/examples/basic_bitcoin/src/index.did deleted file mode 100644 index e3f4395746..0000000000 --- a/examples/basic_bitcoin/src/index.did +++ /dev/null @@ -1,20 +0,0 @@ -type BitcoinNetwork = variant { Mainnet; Regtest; Testnet }; -type ManualReply = record { - next_page : opt vec nat8; - tip_height : nat32; - tip_block_hash : vec nat8; - utxos : vec Utxo; -}; -type Outpoint = record { txid : vec nat8; vout : nat32 }; -type SendRequest = record { - amountInSatoshi : nat64; - destinationAddress : text; -}; -type Utxo = record { height : nat32; value : nat64; outpoint : Outpoint }; -service : (BitcoinNetwork) -> { - getBalance : (text) -> (nat64); - getCurrentFeePercentiles : () -> (vec nat64); - getP2PKHAddress : () -> (text); - getUtxos : (text) -> (ManualReply); - send : (SendRequest) -> (text); -} \ No newline at end of file diff --git a/examples/basic_bitcoin/src/index.ts b/examples/basic_bitcoin/src/index.ts index 0e0fceda3f..b93888f068 100644 --- a/examples/basic_bitcoin/src/index.ts +++ b/examples/basic_bitcoin/src/index.ts @@ -1,93 +1,113 @@ -// @ts-nocheck - -import { $init, $postUpgrade, $update, blob, match, nat64, Vec } from 'azle'; -import { - BitcoinNetwork, - GetUtxosResult, - MillisatoshiPerByte -} from 'azle/canisters/management'; +import { jsonParse, jsonStringify } from 'azle'; +import { BitcoinNetwork } from 'azle/canisters/management'; +import express, { Request } from 'express'; import * as bitcoinApi from './bitcoin_api'; import * as bitcoinWallet from './bitcoin_wallet'; -import { SendRequest } from './types'; // The bitcoin network to connect to. // // When developing locally this should be `Regtest`. // When deploying to the IC this should be `Testnet`. // `Mainnet` is currently unsupported. -let NETWORK: BitcoinNetwork = { - Testnet: null +const NETWORK: BitcoinNetwork = determineNetwork( + process.env.BITCOIN_NETWORK +) ?? { + testnet: null }; // The derivation path to use for ECDSA secp256k1. -let DERIVATION_PATH: Vec = []; +const DERIVATION_PATH: Uint8Array[] = []; // The ECDSA key name. -let KEY_NAME: string = ''; - -$init; -export function init(network: BitcoinNetwork): void { - NETWORK = network; +const KEY_NAME: string = determineKeyName(NETWORK); - KEY_NAME = match(network, { - Mainnet: () => 'test_key_1', - Testnet: () => 'test_key_1', - Regtest: () => 'dfx_test_key' - }); -} +const app = express(); -$postUpgrade; -export function postUpgrade(network: BitcoinNetwork): void { - NETWORK = network; - - KEY_NAME = match(network, { - Mainnet: () => 'test_key_1', - Testnet: () => 'test_key_1', - Regtest: () => 'dfx_test_key' - }); -} +app.use(express.json()); /// Returns the balance of the given bitcoin address. -$update; -export async function getBalance(address: string): Promise { - return await bitcoinApi.getBalance(NETWORK, address); -} +app.get( + '/get-balance', + async (req: Request, res) => { + const balance = await bitcoinApi.getBalance(NETWORK, req.query.address); + + res.send(jsonStringify(balance)); + } +); /// Returns the UTXOs of the given bitcoin address. -$update; -export async function getUtxos(address: string): Promise { - return await bitcoinApi.getUtxos(NETWORK, address); -} +app.get( + '/get-utxos', + async (req: Request, res) => { + const utxos = await bitcoinApi.getUtxos(NETWORK, req.query.address); + + res.send(jsonStringify(utxos)); + } +); /// Returns the 100 fee percentiles measured in millisatoshi/byte. /// Percentiles are computed from the last 10,000 transactions (if available). -$update; -export async function getCurrentFeePercentiles(): Promise< - Vec -> { - return await bitcoinApi.getCurrentFeePercentiles(NETWORK); -} +app.get('/get-current-fee-percentiles', async (req, res) => { + const feePercentiles = await bitcoinApi.getCurrentFeePercentiles(NETWORK); + + res.send(jsonStringify(feePercentiles)); +}); /// Returns the P2PKH address of this canister at a specific derivation path. -$update; -export async function getP2PKHAddress(): Promise { - return await bitcoinWallet.getP2PKHAddress( +app.get('/get-p2pkh-address', async (req, res) => { + const address = await bitcoinWallet.getP2pkhAddress( NETWORK, KEY_NAME, DERIVATION_PATH ); -} -$update; -export async function send(request: SendRequest): Promise { + res.send(address); +}); + +/// Sends the given amount of bitcoin from this canister to the given address. +/// Returns the transaction ID. +app.post('/send', async (req, res) => { + const { destinationAddress, amountInSatoshi } = req.body; + const txId = await bitcoinWallet.send( NETWORK, DERIVATION_PATH, KEY_NAME, - request.destinationAddress, - request.amountInSatoshi + destinationAddress, + BigInt(jsonParse(JSON.stringify(amountInSatoshi))) ); - return txId.to_string(); + res.send(txId); +}); + +app.listen(); + +function determineKeyName(network: BitcoinNetwork): string { + if (network.mainnet === null) { + return 'test_key_1'; + } else if (network.testnet === null) { + return 'test_key_1'; + } else if (network.regtest === null) { + return 'dfx_test_key'; + } + throw new Error('Invalid Bitcoin Network'); +} + +export function determineNetwork( + networkName?: string +): BitcoinNetwork | undefined { + if (networkName === undefined) { + return undefined; + } + if (networkName === 'mainnet') { + return { mainnet: null }; + } + if (networkName === 'testnet') { + return { testnet: null }; + } + if (networkName === 'regtest') { + return { regtest: null }; + } + throw new Error('Invalid Bitcoin Network'); } diff --git a/examples/basic_bitcoin/src/types.ts b/examples/basic_bitcoin/src/types.ts deleted file mode 100644 index 2f2e17321f..0000000000 --- a/examples/basic_bitcoin/src/types.ts +++ /dev/null @@ -1,8 +0,0 @@ -// @ts-nocheck - -import { nat64, Record } from 'azle'; - -export type SendRequest = Record<{ - destinationAddress: string; - amountInSatoshi: nat64; -}>; diff --git a/examples/basic_bitcoin/test/bitcoin.ts b/examples/basic_bitcoin/test/bitcoin.ts new file mode 100644 index 0000000000..bf7d119c11 --- /dev/null +++ b/examples/basic_bitcoin/test/bitcoin.ts @@ -0,0 +1,46 @@ +import { Transaction } from 'bitcoinjs-lib'; +import { execSync } from 'child_process'; + +export function generateToAddress(address: string, blocks: number) { + execSync( + `.bitcoin/bin/bitcoin-cli -conf=$(pwd)/.bitcoin.conf generatetoaddress ${blocks} ${address}` + ); +} + +export function generate(blocks: number) { + execSync( + `.bitcoin/bin/bitcoin-cli -conf=$(pwd)/.bitcoin.conf -generate ${blocks}` + ); +} + +export function createWallet(name: string) { + execSync( + `.bitcoin/bin/bitcoin-cli -conf=$(pwd)/.bitcoin.conf createwallet ${name}` + ); +} + +export function getMempoolCount(): number { + const mempool = execSync( + `.bitcoin/bin/bitcoin-cli -conf=$(pwd)/.bitcoin.conf getrawmempool true` + ) + .toString() + .trim(); + + const mempoolObj = JSON.parse(mempool); + + const transactionCount = Object.keys(mempoolObj).length; + + return transactionCount; +} + +export function getTransaction(txid: string): Transaction { + return Transaction.fromHex(getTxHex(txid)); +} + +function getTxHex(txid: string): string { + return execSync( + `.bitcoin/bin/bitcoin-cli -conf=$(pwd)/.bitcoin.conf getrawtransaction ${txid}` + ) + .toString() + .trim(); +} diff --git a/examples/basic_bitcoin/test/pretest.ts b/examples/basic_bitcoin/test/pretest.ts new file mode 100644 index 0000000000..40ccad9e6e --- /dev/null +++ b/examples/basic_bitcoin/test/pretest.ts @@ -0,0 +1,13 @@ +import { execSync } from 'child_process'; + +async function pretest() { + execSync(`dfx canister uninstall-code basic_bitcoin || true`, { + stdio: 'inherit' + }); + + execSync(`BITCOIN_NETWORK=regtest dfx deploy`, { + stdio: 'inherit' + }); +} + +pretest(); diff --git a/examples/basic_bitcoin/test/test.ts b/examples/basic_bitcoin/test/test.ts new file mode 100644 index 0000000000..34b64e1d11 --- /dev/null +++ b/examples/basic_bitcoin/test/test.ts @@ -0,0 +1,46 @@ +import { getCanisterId } from 'azle/dfx'; +import { runTests } from 'azle/test'; +import { ChildProcessWithoutNullStreams, spawn } from 'child_process'; +import { existsSync, rmSync } from 'fs-extra'; + +import { getTests } from './tests'; + +const canisterId = getCanisterId('basic_bitcoin'); + +export async function whileRunningBitcoinDaemon( + callback: () => Promise | void +) { + const bitcoinDaemon = await startBitcoinDaemon(); + await callback(); + bitcoinDaemon.kill(); +} + +async function startBitcoinDaemon(): Promise { + if (existsSync(`.bitcoin/data/regtest`)) { + rmSync('.bitcoin/data/regtest', { recursive: true, force: true }); + } + const bitcoinDaemon = spawn('.bitcoin/bin/bitcoind', [ + `-conf=${process.cwd()}/.bitcoin.conf`, + `-datadir=${process.cwd()}/.bitcoin/data`, + '--port=18444' + ]); + + process.on('uncaughtException', () => { + if (!bitcoinDaemon.killed) { + bitcoinDaemon.kill(); + } + }); + + process.on('exit', () => { + if (!bitcoinDaemon.killed) { + bitcoinDaemon.kill(); + } + }); + + console.info(`starting bitcoind...`); + // This await is necessary to ensure the daemon is running + await new Promise((resolve) => setTimeout(resolve, 5000)); + return bitcoinDaemon; +} + +whileRunningBitcoinDaemon(() => runTests(getTests(canisterId))); diff --git a/examples/basic_bitcoin/test/tests.ts b/examples/basic_bitcoin/test/tests.ts new file mode 100644 index 0000000000..d951af542e --- /dev/null +++ b/examples/basic_bitcoin/test/tests.ts @@ -0,0 +1,352 @@ +import * as dns from 'node:dns'; +dns.setDefaultResultOrder('ipv4first'); + +import { jsonParse, jsonStringify } from 'azle'; +import { GetUtxosResult, Utxo } from 'azle/canisters/management'; +import { AzleResult, Test } from 'azle/test'; +import { Transaction } from 'bitcoinjs-lib'; + +import { + createWallet, + generate, + generateToAddress, + getMempoolCount, + getTransaction +} from './bitcoin'; + +const SINGLE_BLOCK_REWARD = 5_000_000_000n; +const FIRST_MINING_SESSION = 101; +const FIRST_AMOUNT_SENT = SINGLE_BLOCK_REWARD / 2n; +const SECOND_AMOUNT_SENT = SINGLE_BLOCK_REWARD * 2n; +const TO_ADDRESS = 'n4HY51WrdxATGEPqYvoNkEsTteRfuRMxpD'; + +let lastTxid = ''; +let toAddressPreviousBalance = 0n; +let canisterPreviousBalance = 0n; + +export function getTests(canisterId: string): Test[] { + const origin = `http://${canisterId}.localhost:8000`; + const canisterAddressForm = 'mhVmPSYFraAYnA4ZP6KUx41P3dKgAg27Cm'; // p2pkh-address on the regtest will generally be of this form, starting with m or n and this many characters. + return [ + { + name: 'Set up minting wallet', + prep: async () => { + createWallet('minty'); + } + }, + { + name: '/get-p2pkh-address', + test: async () => { + const address = await getP2pkhAddress(origin); + + return { Ok: canisterAddressForm.length === address.length }; + } + }, + { + name: '/get-balance', + test: async () => { + const address = await getP2pkhAddress(origin); + const balance = await getBalance(origin, address); + + return compareBalances(0n, balance); + } + }, + { + name: 'first mint BTC', + prep: async () => { + const address = await getP2pkhAddress(origin); + generateToAddress(address, FIRST_MINING_SESSION); + } + }, + { name: 'wait for blocks to settle', wait: 30_000 }, + { + name: '/get-balance', + test: async () => { + const address = await getP2pkhAddress(origin); + const balance = await getBalance(origin, address); + + return compareBalances( + SINGLE_BLOCK_REWARD * BigInt(FIRST_MINING_SESSION), + balance + ); + } + }, + { + name: '/get-utxos', + test: async () => { + const address = await getP2pkhAddress(origin); + + const response = await fetch( + `${origin}/get-utxos?address=${address}`, + { headers: [['X-Ic-Force-Update', 'true']] } + ); + const utxosResult: GetUtxosResult = await jsonParse( + await response.text() + ); + + return { + Ok: + utxosResult.tip_height === FIRST_MINING_SESSION && + utxosResult.utxos.length === FIRST_MINING_SESSION && + checkUtxos(utxosResult.utxos) + }; + } + }, + { + name: '/get-current-fee-percentiles', + test: async () => { + const response = await fetch( + `${origin}/get-current-fee-percentiles`, + { headers: [['X-Ic-Force-Update', 'true']] } + ); + + const feePercentiles = jsonParse(await response.text()); + + // Though blocks are mined no transactions have happened yet so the list should still be empty + return { Ok: feePercentiles.length === 0 }; + } + }, + { + name: `/get-balance of ${TO_ADDRESS}`, + test: async () => { + const balance = await getBalance(origin, TO_ADDRESS); + + return compareBalances(0n, balance); + } + }, + { + name: `/send from canister to ${TO_ADDRESS}`, + prep: async () => { + const body = jsonStringify({ + amountInSatoshi: FIRST_AMOUNT_SENT, + destinationAddress: TO_ADDRESS + }); + const response = await fetch(`${origin}/send`, { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body + }); + lastTxid = await response.text(); + console.info(lastTxid); + } + }, + { + name: 'wait for transaction to appear in mempool', + prep: waitForMempool + }, + { + name: 'mine a block with the latest transaction', + prep: async () => { + generate(1); + } + }, + { name: 'wait for blocks to settle', wait: 15_000 }, + { + name: `/get-balance of ${TO_ADDRESS} final`, + test: async () => { + const balance = await getBalance(origin, TO_ADDRESS); + toAddressPreviousBalance = balance; + + return compareBalances(FIRST_AMOUNT_SENT, balance); + } + }, + { + name: '/get-balance final', + test: async () => { + const address = await getP2pkhAddress(origin); + const balance = await getBalance(origin, address); + canisterPreviousBalance = balance; + + // At the time this transaction was made, the canister only had utxos from block rewards. + // The amount sent and the fee was less than the reward from minting a single block so there will be only one input and it will have the value of that reward. + const fee = getFeeFromTransaction( + lastTxid, + SINGLE_BLOCK_REWARD + ); + + const blockRewards = + SINGLE_BLOCK_REWARD * BigInt(FIRST_MINING_SESSION); + + const expectedBalance = blockRewards - FIRST_AMOUNT_SENT - fee; + + return compareBalances(expectedBalance, balance); + } + }, + { + name: '/get-current-fee-percentiles', + test: async () => { + const response = await fetch( + `${origin}/get-current-fee-percentiles`, + { headers: [['X-Ic-Force-Update', 'true']] } + ); + + const feePercentiles = jsonParse(await response.text()); + + return { + Ok: feePercentiles.length === 101 + }; + } + }, + { + name: "Generate blocks to ensure that enough of the canister's block rewards are available to spend", + prep: async () => { + generate(10); + } + }, + { + name: `/send big from canister to ${TO_ADDRESS}`, + prep: async () => { + const body = jsonStringify({ + amountInSatoshi: SECOND_AMOUNT_SENT, + destinationAddress: TO_ADDRESS + }); + const response = await fetch(`${origin}/send`, { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body + }); + lastTxid = await response.text(); + console.info(lastTxid); + } + }, + { + name: 'wait for transaction to appear in mempool', + prep: waitForMempool + }, + { + name: 'mine a block for the latest transaction', + prep: async () => { + generate(1); + } + }, + { name: 'wait for blocks to settle', wait: 15_000 }, + { + name: `/get-balance of ${TO_ADDRESS} big`, + test: async () => { + const balance = await getBalance(origin, TO_ADDRESS); + const expectedBalance = + toAddressPreviousBalance + SECOND_AMOUNT_SENT; + + return compareBalances(expectedBalance, balance); + } + }, + { + name: '/get-balance big', + test: async () => { + const address = await getP2pkhAddress(origin); + const balance = await getBalance(origin, address); + + // At the time this transaction was made, the next utxos to use will be from block rewards. + // The amount sent and the fee were more than the reward from minting two blocks so there will be three inputs and it will have the value of those rewards. + const fee = getFeeFromTransaction( + lastTxid, + SINGLE_BLOCK_REWARD * 3n + ); + + const expectedBalance = + canisterPreviousBalance - SECOND_AMOUNT_SENT - fee; + + return compareBalances(expectedBalance, balance); + } + }, + { + name: '/get-current-fee-percentiles', + test: async () => { + const response = await fetch( + `${origin}/get-current-fee-percentiles`, + { headers: [['X-Ic-Force-Update', 'true']] } + ); + + const feePercentiles = jsonParse(await response.text()); + + return { + Ok: feePercentiles.length === 101 + }; + } + }, + { + name: 'mine a block to see if it resets the fee percentiles', + prep: async () => { + generate(1); + } + }, + { name: 'wait for blocks to settle', wait: 15_000 }, + { + name: '/get-current-fee-percentiles', + test: async () => { + const response = await fetch( + `${origin}/get-current-fee-percentiles`, + { headers: [['X-Ic-Force-Update', 'true']] } + ); + + const feePercentiles = jsonParse(await response.text()); + + return { + Ok: feePercentiles.length === 0 + }; + } + } + ]; +} + +function compareBalances( + expected: bigint, + actual: bigint +): AzleResult { + if (expected === actual) { + return { Ok: true }; + } else { + return { Err: `Expected: ${expected}, Received: ${actual}` }; + } +} + +/** + * The fee is determined by finding the difference between the total value of the inputs minus the total value of the outputs + * The value of the outputs is easily found by looking at the transaction with the provided txid + * The value of the inputs is not easily calculated automatically and must be provided + * @param txid + * @param totalInputValue + * @returns + */ +function getFeeFromTransaction(txid: string, totalInputValue: bigint): bigint { + const previousTransaction = getTransaction(txid); + const outputValue = BigInt(getTotalOutput(previousTransaction)); + return totalInputValue - outputValue; +} + +function getTotalOutput(tx: Transaction): number { + return tx.outs.reduce((total, output) => { + return total + output.value; + }, 0); +} + +async function getP2pkhAddress(origin: string): Promise { + const response = await fetch(`${origin}/get-p2pkh-address`, { + headers: [['X-Ic-Force-Update', 'true']] + }); + return await response.text(); +} + +async function getBalance(origin: string, address: string): Promise { + const response = await fetch(`${origin}/get-balance?address=${address}`, { + headers: [['X-Ic-Force-Update', 'true']] + }); + return jsonParse(await response.text()); +} + +function checkUtxos(utxos: Utxo[]): boolean { + return utxos.every( + (utxo) => utxo.value === SINGLE_BLOCK_REWARD && utxo.outpoint.vout === 0 + ); +} + +async function waitForMempool() { + for (let i = 0; i < 60; i++) { + if (getMempoolCount() > 0) { + console.info('done waiting'); + return; + } + await new Promise((resolve) => setTimeout(resolve, 1_000)); + } + throw new Error('Timeout: Transaction was not added to the mempool'); +} diff --git a/examples/bitcoinjs-lib/src/index.ts b/examples/bitcoinjs-lib/src/index.ts index 82fc7a905d..8aa5be2a0b 100644 --- a/examples/bitcoinjs-lib/src/index.ts +++ b/examples/bitcoinjs-lib/src/index.ts @@ -187,7 +187,7 @@ app.post('/create-psbt', (req, res) => { const keyPair = ECPair.fromWIF( 'L2uPYXe17xSTqbCjZvL2DsyXPCbXspvcu5mHLDYUgzdUbZGSKrSr' ); - const psbt = new bitcoin.Psbt(); + let psbt = new bitcoin.Psbt(); psbt.addInput({ // if hash is string, txid, if hash is Buffer, is reversed compared to txid hash: '7d067b4a697a09d2c3cff7d4d9506c9955e93bff41bf82d439da7d030382bc3e', diff --git a/examples/ckbtc/scripts/install/bitcoin.sh b/examples/ckbtc/scripts/install/bitcoin.sh index 0bcdbfe762..a4d0f03526 100755 --- a/examples/ckbtc/scripts/install/bitcoin.sh +++ b/examples/ckbtc/scripts/install/bitcoin.sh @@ -1,14 +1,6 @@ #!/bin/bash -# Check if .bitcoin directory exists; if not, create it -if [ ! -d ".bitcoin" ]; then - mkdir .bitcoin -fi - -# Check if .bitcoin/data directory exists; if not, create it -if [ ! -d ".bitcoin/data" ]; then - mkdir .bitcoin/data -fi +mkdir -p .bitcoin/data # Check if bitcoind executable exists; if not, download and extract it if [ ! -f ".bitcoin/bin/bitcoind" ]; then diff --git a/src/compiler/Dockerfile b/src/compiler/Dockerfile index feef4a4b75..83dcf84ead 100644 --- a/src/compiler/Dockerfile +++ b/src/compiler/Dockerfile @@ -12,7 +12,7 @@ RUN apt-get install -y curl RUN apt-get install -y git ENV PATH="/root/.cargo/bin:${PATH}" -RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=1.73.0 --profile=minimal +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=1.75.0 --profile=minimal RUN rustup target add wasm32-wasi RUN cargo install --git https://github.com/wasm-forge/wasi2ic --rev 806c3558aad24224852a9582f018178402cb3679