diff --git a/.github/workflows/solana.yml b/.github/workflows/solana.yml index 0faa6174e..ad760544f 100644 --- a/.github/workflows/solana.yml +++ b/.github/workflows/solana.yml @@ -144,7 +144,7 @@ jobs: shell: bash - name: Check idl run: | - git diff --exit-code idl + git diff --exit-code ts/idl - name: Run tests - run: anchor test + run: anchor test --skip-build shell: bash diff --git a/Makefile b/Makefile index 567eb7f5d..6fbd75075 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ build-evm-prod: clean-evm .PHONY: gen-evm-bindings gen-evm-bindings: build-evm-prod - cd sdk && npm ci && cd evm && npm run generate + npm ci && cd sdk/evm && npm run generate ####################### ## TESTS diff --git a/Tiltfile b/Tiltfile index 3c6010134..3132177b1 100644 --- a/Tiltfile +++ b/Tiltfile @@ -2,7 +2,7 @@ load('ext://namespace', 'namespace_create', 'namespace_inject') load('ext://git_resource', 'git_checkout') git_checkout('https://github.com/wormhole-foundation/wormhole.git#main', '.wormhole/', unsafe_mode=True) -local(['sed','-i','/{chainId: vaa.ChainIDEthereum, addr: "000000000000000000000000855FA758c77D68a04990E992aA4dcdeF899F654A"},/i {chainId: vaa.ChainIDSolana, addr: "8bf0b547c96edc5c1d512ca25c5c1d1812a180438a0046e511d1fb61561d5cdf"},{chainId: vaa.ChainIDSolana, addr: "0a490691c21334ca173d9ce386e2a86774ce173f351db10d5d0cccc5c4875376"},{chainId: vaa.ChainIDEthereum, addr: "00000000000000000000000042D4BA5e542d9FeD87EA657f0295F1968A61c00A"},{chainId: vaa.ChainIDEthereum, addr: "000000000000000000000000c3ef4965b788cc4b905084d01f2eb7d4b6e93abf"},{chainId: vaa.ChainIDBSC, addr: "000000000000000000000000C5aFE31AE505594B190AC71EA689B58139d1C354"},{chainId: vaa.ChainIDBSC, addr: "0000000000000000000000003f4e941ef5071a1d09c2eb4a24da1fc43f76fcff"},', '.wormhole/node/pkg/accountant/ntt_config.go']) +local(['sed','-i','/{chainId: vaa.ChainIDEthereum, addr: "000000000000000000000000855FA758c77D68a04990E992aA4dcdeF899F654A"},/i {chainId: vaa.ChainIDSolana, addr: "8bf0b547c96edc5c1d512ca25c5c1d1812a180438a0046e511d1fb61561d5cdf"},{chainId: vaa.ChainIDSolana, addr: "0a490691c21334ca173d9ce386e2a86774ce173f351db10d5d0cccc5c4875376"},{chainId: vaa.ChainIDEthereum, addr: "0000000000000000000000006f84742680311cef5ba42bc10a71a4708b4561d1"},{chainId: vaa.ChainIDEthereum, addr: "000000000000000000000000c3ef4965b788cc4b905084d01f2eb7d4b6e93abf"},{chainId: vaa.ChainIDBSC, addr: "0000000000000000000000006f84742680311cef5ba42bc10a71a4708b4561d1"},{chainId: vaa.ChainIDBSC, addr: "0000000000000000000000003f4e941ef5071a1d09c2eb4a24da1fc43f76fcff"},', '.wormhole/node/pkg/accountant/ntt_config.go']) load(".wormhole/Tiltfile", "namespace", "k8s_yaml_with_ns") @@ -50,7 +50,8 @@ docker_build( # CI tests docker_build( ref = "ntt-ci", - context = "./sdk", + context = "./", + only=["./sdk", "./package.json", "./package-lock.json", "jest.config.ts", "tsconfig.json", "tsconfig.test.json"], dockerfile = "./sdk/Dockerfile", ) k8s_yaml_with_ns("./sdk/ci.yaml") diff --git a/sdk/jest.config.ts b/jest.config.ts similarity index 93% rename from sdk/jest.config.ts rename to jest.config.ts index 23159500c..9fd3db3fb 100644 --- a/sdk/jest.config.ts +++ b/jest.config.ts @@ -3,7 +3,7 @@ import type { JestConfigWithTsJest } from "ts-jest"; const jestConfig: JestConfigWithTsJest = { verbose: true, testTimeout: 10000000, - roots: ["./__tests__"], + roots: ["./sdk/__tests__"], testMatch: ["**/*.test.ts"], modulePathIgnorePatterns: ["mocks"], preset: "ts-jest", diff --git a/sdk/package-lock.json b/package-lock.json similarity index 94% rename from sdk/package-lock.json rename to package-lock.json index f3ff6a700..f6c005a78 100644 --- a/sdk/package-lock.json +++ b/package-lock.json @@ -1,28 +1,27 @@ { - "name": "ntt-sdk", - "version": "0.0.1-beta.1", + "name": "ntt", + "version": "0.0.1-beta.5", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "ntt-sdk", - "version": "0.0.1-beta.1", + "name": "ntt", + "version": "0.0.1-beta.5", "license": "Apache-2.0", "workspaces": [ - "definitions", + "sdk/definitions", + "sdk/evm", "solana", - "evm", - "route", - "examples" + "sdk/route", + "sdk/examples", + "cli" ], - "dependencies": { - "@wormhole-foundation/sdk": "0.5.3-beta.9" - }, "devDependencies": { "@solana/spl-token": "0.3.9", "@solana/web3.js": "1.91.7", "@types/jest": "^29.5.12", "@types/node": "^20.12.2", + "@wormhole-foundation/sdk": "0.6.5", "@wormhole-foundation/wormchain-sdk": "^0.0.1", "ethers": "^6.5.1", "ts-jest": "^29.1.2", @@ -30,82 +29,49 @@ "typescript": "^5.1.1" } }, - "definitions": { - "name": "@wormhole-foundation/sdk-definitions-ntt", - "version": "0.0.1-beta.1", - "dependencies": { - "@noble/hashes": "^1.3.1", - "@wormhole-foundation/sdk-base": "0.5.3-beta.9", - "@wormhole-foundation/sdk-definitions": "0.5.3-beta.9" - } - }, - "evm": { - "name": "@wormhole-foundation/sdk-evm-ntt", - "version": "0.0.1-beta.1", - "license": "Apache-2.0", + "cli": { + "version": "0.0.1-beta.5", "dependencies": { - "@wormhole-foundation/sdk-connect": "0.5.3-beta.9", - "@wormhole-foundation/sdk-definitions-ntt": "0.0.1-beta.1", - "@wormhole-foundation/sdk-evm": "0.5.3-beta.9", - "@wormhole-foundation/sdk-evm-core": "0.5.3-beta.9", - "ethers": "^6.5.1" + "yargs": "^17.7.2" }, - "devDependencies": { - "@typechain/ethers-v6": "^0.5.1", - "tsx": "^4.7.2", - "typechain": "^8.3.2" + "bin": { + "ntt": "src/index.ts" }, - "engines": { - "node": ">=16" - } - }, - "evm/node_modules/@typechain/ethers-v6": { - "version": "0.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "lodash": "^4.17.15", - "ts-essentials": "^7.0.1" + "devDependencies": { + "@types/bun": "latest", + "@types/yargs": "^17.0.32" }, "peerDependencies": { - "ethers": "6.x", - "typechain": "^8.3.2", - "typescript": ">=4.7.0" + "typescript": "^5.0.0" } }, - "examples": { - "name": "@wormhole-foundation/sdk-examples-ntt", - "version": "0.0.1-beta.1", - "license": "Apache-2.0", + "cli/node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dependencies": { - "@wormhole-foundation/sdk": "0.5.3-beta.9", - "@wormhole-foundation/sdk-definitions-ntt": "0.0.1-beta.1", - "@wormhole-foundation/sdk-evm-ntt": "0.0.1-beta.1", - "@wormhole-foundation/sdk-route-ntt": "0.0.1-beta.1", - "@wormhole-foundation/sdk-solana-ntt": "0.0.1-beta.1" - }, - "devDependencies": { - "@types/bn.js": "^5.1.5", - "dotenv": "^16.4.5", - "nock": "^13.3.3", - "ts-jest": "^29.1.2", - "ts-node": "^10.9.2", - "tsx": "^4.7.2" + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" }, "engines": { - "node": ">=16" + "node": ">=12" } }, - "examples/node_modules/dotenv": { - "version": "16.4.5", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", - "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", - "dev": true, + "cli/node_modules/yargs": { + "version": "17.7.2", + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, "engines": { "node": ">=12" - }, - "funding": { - "url": "https://dotenvx.com" } }, "node_modules/@0no-co/graphql.web": { @@ -122,11 +88,11 @@ } }, "node_modules/@0no-co/graphqlsp": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/@0no-co/graphqlsp/-/graphqlsp-1.10.3.tgz", - "integrity": "sha512-8XHFj1efXLywmutSYfzHaqMU2lgfo7onugNj9LZN5kiQNEXIDPPeRqecZukkt4FqHe4J9MBUdn13NVLa3a6JiQ==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@0no-co/graphqlsp/-/graphqlsp-1.12.1.tgz", + "integrity": "sha512-KHMs1a9qXoiwA4aUKGgcsyM38SXH6ddQFwu4Hf2p8XjUOkRKHy38pd4qYM0hgA1vpkUf8WSj5GyDAbezhApfpw==", "dependencies": { - "@gql.tada/internal": "^0.1.2", + "@gql.tada/internal": "^0.3.0", "graphql": "^16.8.1", "node-fetch": "^2.0.0" }, @@ -134,18 +100,6 @@ "typescript": "^5.0.0" } }, - "node_modules/@0no-co/graphqlsp/node_modules/@gql.tada/internal": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@gql.tada/internal/-/internal-0.1.3.tgz", - "integrity": "sha512-wIvykBId7O0gaizmSl5n5AhbQsgJVLTUsFBm3RsfQ9dVfpmT+Fhy2yHX+yNgiVECg2EimXMhs4ltcE4EuZ2WOA==", - "dependencies": { - "@0no-co/graphql.web": "^1.0.5" - }, - "peerDependencies": { - "graphql": "^16.8.1", - "typescript": "^5.0.0" - } - }, "node_modules/@adraffy/ens-normalize": { "version": "1.10.1", "resolved": "https://registry.npmjs.org/@adraffy/ens-normalize/-/ens-normalize-1.10.1.tgz", @@ -155,7 +109,6 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", - "dev": true, "peer": true, "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", @@ -166,9 +119,9 @@ } }, "node_modules/@apollo/client": { - "version": "3.9.11", - "resolved": "https://registry.npmjs.org/@apollo/client/-/client-3.9.11.tgz", - "integrity": "sha512-H7e9m7cRcFO93tokwzqrsbnfKorkpV24xU30hFH5u2g6B+c1DMo/ouyF/YrBPdrTzqxQCjTUmds/FLmJ7626GA==", + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/@apollo/client/-/client-3.10.1.tgz", + "integrity": "sha512-QNacQBZzJla5UQ/LLBXJWM7/1v1C5cfpMQPAFjW4hg4T54wHWbg4Dr+Dp6N+hy/ygu8tepdM+/y/5VFLZhovlQ==", "dependencies": { "@graphql-typed-document-node/core": "^3.1.1", "@wry/caches": "^1.0.0", @@ -178,7 +131,7 @@ "hoist-non-react-statics": "^3.3.2", "optimism": "^0.18.0", "prop-types": "^15.7.2", - "rehackt": "0.0.6", + "rehackt": "^0.1.0", "response-iterator": "^0.2.6", "symbol-observable": "^4.0.0", "ts-invariant": "^0.10.3", @@ -243,9 +196,9 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.1.tgz", - "integrity": "sha512-Pc65opHDliVpRHuKfzI+gSA4zcgr65O4cl64fFJIWEEh8JoHIHh0Oez1Eo8Arz8zq/JhgKodQaxEwUPRtZylVA==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.4.tgz", + "integrity": "sha512-vg8Gih2MLK+kOkHJp4gBEIkyaIi00jgWot2D9QOmmfLC8jINSOzmCLta6Bvz/JSBCqnegV0L80jhxkol5GWNfQ==", "dev": true, "peer": true, "engines": { @@ -253,19 +206,19 @@ } }, "node_modules/@babel/core": { - "version": "7.24.3", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.3.tgz", - "integrity": "sha512-5FcvN1JHw2sHJChotgx8Ek0lyuh4kCKelgMTTqhYJJtloNvUfpAFMeNQUtdlIaktwrSV9LtCdqwk48wL2wBacQ==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.4.tgz", + "integrity": "sha512-MBVlMXP+kkl5394RBLSxxk/iLTeVGuXTV3cIDXavPpMMqnSnt6apKgan/U8O3USWZCWZT/TbgfEpKa4uMgN4Dg==", "dev": true, "peer": true, "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.24.2", - "@babel/generator": "^7.24.1", + "@babel/generator": "^7.24.4", "@babel/helper-compilation-targets": "^7.23.6", "@babel/helper-module-transforms": "^7.23.3", - "@babel/helpers": "^7.24.1", - "@babel/parser": "^7.24.1", + "@babel/helpers": "^7.24.4", + "@babel/parser": "^7.24.4", "@babel/template": "^7.24.0", "@babel/traverse": "^7.24.1", "@babel/types": "^7.24.0", @@ -284,9 +237,9 @@ } }, "node_modules/@babel/generator": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.1.tgz", - "integrity": "sha512-DfCRfZsBcrPEHUfuBMgbJ1Ut01Y/itOs+hY2nFLgqsqXd52/iSiVq5TITtUasIUgm+IIKdY2/1I7auiQOEeC9A==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.4.tgz", + "integrity": "sha512-Xd6+v6SnjWVx/nus+y0l1sxMOTOMBkyL4+BIdbALyatQnAe/SRVjANeDPSCYaX+i1iJmuGSKf3Z+E+V/va1Hvw==", "dev": true, "peer": true, "dependencies": { @@ -452,9 +405,9 @@ } }, "node_modules/@babel/helpers": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.1.tgz", - "integrity": "sha512-BpU09QqEe6ZCHuIHFphEFgvNSrubve1FtyMton26ekZ85gRGi6LrTF7zArARp2YvyFxloeiRmtSCq5sjh1WqIg==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.4.tgz", + "integrity": "sha512-FewdlZbSiwaVGlgT1DPANDuCHaDMiOo+D/IDYRFYjHOuv66xMSJ7fQwwODwRNAPkADIO/z1EoF/l2BCWlWABDw==", "dev": true, "peer": true, "dependencies": { @@ -553,9 +506,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.1.tgz", - "integrity": "sha512-Zo9c7N3xdOIQrNip7Lc9wvRPzlRtovHVE4lkz8WEDr7uYh/GMQhSiIgFxGIArRHYdJE5kxtZjAf8rT0xhdLCzg==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.4.tgz", + "integrity": "sha512-zTvEBcghmeBma9QIGunWevvBAp4/Qu9Bdq+2k0Ot4fVMD6v3dsC9WOcRSKk7tRRyBM/53yKMJko9xOatGQAwSg==", "bin": { "parser": "bin/babel-parser.js" }, @@ -755,9 +708,9 @@ } }, "node_modules/@babel/runtime": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.1.tgz", - "integrity": "sha512-+BIznRzyqBf+2wCTxcKE3wDjfGeCoVE61KSHGpkzqrLi8qxqFwBeUFyId2cxkTmm55fzDGnm0+yCxaxygrLUnQ==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.4.tgz", + "integrity": "sha512-dkxf7+hn8mFBwKjs9bvBlArzLVxVbS8usaPUDd5p2a9JCL9tB8OaOVN1isD4+Xyk4ns89/xeOmbQvgdK7IIVdA==", "dependencies": { "regenerator-runtime": "^0.14.0" }, @@ -1133,26 +1086,6 @@ "xstream": "^11.14.0" } }, - "node_modules/@cosmjs/socket/node_modules/ws": { - "version": "7.5.9", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", - "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", - "engines": { - "node": ">=8.3.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, "node_modules/@cosmjs/stargate": { "version": "0.32.3", "resolved": "https://registry.npmjs.org/@cosmjs/stargate/-/stargate-0.32.3.tgz", @@ -2316,24 +2249,25 @@ } }, "node_modules/@gql.tada/cli-utils": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@gql.tada/cli-utils/-/cli-utils-1.1.1.tgz", - "integrity": "sha512-h+6p6kQYma5eAMayn0FV3UtCCRFcyZp8zfbl4qYTzFSzQ1zrQIxuSaTmskdGBD3rgPnxrOkXHYzk9xgL1IeXkQ==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@gql.tada/cli-utils/-/cli-utils-1.3.3.tgz", + "integrity": "sha512-XdKhu2xmnFmilOdt/XzF84ld15la9yOVfTn+F464ssXzRJH0FN8Qi+lRpxVogdMii4TYt59YmEh9jnl5z4GN/g==", "dependencies": { - "@0no-co/graphqlsp": "^1.10.0", - "@gql.tada/internal": "0.2.1", - "@vue/language-core": "^2.0.13", + "@0no-co/graphqlsp": "^1.12.1", + "@gql.tada/internal": "0.3.3", + "@vue/compiler-dom": "^3.4.23", + "@vue/language-core": "^2.0.0", "graphql": "^16.8.1", - "ts-morph": "~22.0.0" + "svelte2tsx": "^0.7.6" }, "peerDependencies": { "typescript": "^5.0.0" } }, "node_modules/@gql.tada/internal": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/@gql.tada/internal/-/internal-0.2.1.tgz", - "integrity": "sha512-Nn+vcvIOUliUFaQwl+URNvqBnWd1MuDjvQo63Hy8+DkV3rbRSa0OCVXIR55EQRpIT7ZmPMzYyMQ2Bmj9Mk37vQ==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@gql.tada/internal/-/internal-0.3.3.tgz", + "integrity": "sha512-lBOiN0c/Fx5eY5KGwkzB5+6asUv9IAoD6f5rZjN8r9h4hvSk4V5Kuuu6EfKixF6h5/o/xDRgA/BU3355udnK3g==", "dependencies": { "@0no-co/graphql.web": "^1.0.5" }, @@ -3083,7 +3017,6 @@ "version": "0.3.5", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", - "dev": true, "peer": true, "dependencies": { "@jridgewell/set-array": "^1.2.1", @@ -3098,7 +3031,6 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "dev": true, "engines": { "node": ">=6.0.0" } @@ -3107,7 +3039,6 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", - "dev": true, "peer": true, "engines": { "node": ">=6.0.0" @@ -3116,14 +3047,12 @@ "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 + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.25", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", - "dev": true, "peer": true, "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", @@ -3250,38 +3179,6 @@ "url": "https://paulmillr.com/funding/" } }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/@protobufjs/aspromise": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", @@ -3526,27 +3423,6 @@ "integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==", "dev": true }, - "node_modules/@terra-money/terra.js/node_modules/ws": { - "version": "7.5.9", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", - "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", - "dev": true, - "engines": { - "node": ">=8.3.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, "node_modules/@terra-money/terra.proto": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/@terra-money/terra.proto/-/terra.proto-2.1.0.tgz", @@ -3569,53 +3445,6 @@ "node": ">= 6" } }, - "node_modules/@ts-morph/common": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@ts-morph/common/-/common-0.23.0.tgz", - "integrity": "sha512-m7Lllj9n/S6sOkCkRftpM7L24uvmfXQFedlW/4hENcuJH1HHm9u5EgxZb9uVjQSCGrbBWBkOGgcTxNg36r6ywA==", - "dependencies": { - "fast-glob": "^3.3.2", - "minimatch": "^9.0.3", - "mkdirp": "^3.0.1", - "path-browserify": "^1.0.1" - } - }, - "node_modules/@ts-morph/common/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/@ts-morph/common/node_modules/minimatch": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", - "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@ts-morph/common/node_modules/mkdirp": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", - "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", - "bin": { - "mkdirp": "dist/cjs/src/bin.js" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/@tsconfig/node10": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", @@ -3693,6 +3522,15 @@ "@types/node": "*" } }, + "node_modules/@types/bun": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@types/bun/-/bun-1.1.0.tgz", + "integrity": "sha512-QGK0yU4jh0OK1A7DyhPkQuKjHQCC5jSJa3dpWIEhHv/rPfb6zLfdArc4/uUUZBMTcjilsafRXnPWO+1owb572Q==", + "dev": true, + "dependencies": { + "bun-types": "1.1.0" + } + }, "node_modules/@types/cacheable-request": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz", @@ -3712,6 +3550,12 @@ "@types/node": "*" } }, + "node_modules/@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "peer": true + }, "node_modules/@types/graceful-fs": { "version": "4.1.9", "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", @@ -3788,9 +3632,9 @@ "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==" }, "node_modules/@types/node": { - "version": "20.12.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.2.tgz", - "integrity": "sha512-zQ0NYO87hyN6Xrclcqp7f8ZbXNbRfoGWNcMvHTPQp9UUrwI0mI7XBz+cu7/W6/VClYo2g63B0cjull/srU7LgQ==", + "version": "20.12.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.7.tgz", + "integrity": "sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg==", "dependencies": { "undici-types": "~5.26.4" } @@ -3855,48 +3699,48 @@ "dev": true }, "node_modules/@volar/language-core": { - "version": "2.2.0-alpha.8", - "resolved": "https://registry.npmjs.org/@volar/language-core/-/language-core-2.2.0-alpha.8.tgz", - "integrity": "sha512-Ew1Iw7/RIRNuDLn60fWJdOLApAlfTVPxbPiSLzc434PReC9kleYtaa//Wo2WlN1oiRqneW0pWQQV0CwYqaimLQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@volar/language-core/-/language-core-2.2.0.tgz", + "integrity": "sha512-a8WG9+4OdeNDW4ywABZIM6S6UN7em8uIlM/BZ2pWQUYrVmX+m8sj/X+QadvO+Li/t/LjAqbWJQtVgxdpEWLALQ==", "dependencies": { - "@volar/source-map": "2.2.0-alpha.8" + "@volar/source-map": "2.2.0" } }, "node_modules/@volar/source-map": { - "version": "2.2.0-alpha.8", - "resolved": "https://registry.npmjs.org/@volar/source-map/-/source-map-2.2.0-alpha.8.tgz", - "integrity": "sha512-E1ZVmXFJ5DU4fWDcWHzi8OLqqReqIDwhXvIMhVdk6+VipfMVv4SkryXu7/rs4GA/GsebcRyJdaSkKBB3OAkIcA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@volar/source-map/-/source-map-2.2.0.tgz", + "integrity": "sha512-HQlPRlHOVqCCHK8wI76ZldHkEwKsjp7E6idUc36Ekni+KJDNrqgSqPvyHQixybXPHNU7CI9Uxd9/IkxO7LuNBw==", "dependencies": { "muggle-string": "^0.4.0" } }, "node_modules/@vue/compiler-core": { - "version": "3.4.23", - "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.23.tgz", - "integrity": "sha512-HAFmuVEwNqNdmk+w4VCQ2pkLk1Vw4XYiiyxEp3z/xvl14aLTUBw2OfVH3vBcx+FtGsynQLkkhK410Nah1N2yyQ==", + "version": "3.4.26", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.26.tgz", + "integrity": "sha512-N9Vil6Hvw7NaiyFUFBPXrAyETIGlQ8KcFMkyk6hW1Cl6NvoqvP+Y8p1Eqvx+UdqsnrnI9+HMUEJegzia3mhXmQ==", "dependencies": { - "@babel/parser": "^7.24.1", - "@vue/shared": "3.4.23", + "@babel/parser": "^7.24.4", + "@vue/shared": "3.4.26", "entities": "^4.5.0", "estree-walker": "^2.0.2", "source-map-js": "^1.2.0" } }, "node_modules/@vue/compiler-dom": { - "version": "3.4.23", - "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.23.tgz", - "integrity": "sha512-t0b9WSTnCRrzsBGrDd1LNR5HGzYTr7LX3z6nNBG+KGvZLqrT0mY6NsMzOqlVMBKKXKVuusbbB5aOOFgTY+senw==", + "version": "3.4.26", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.26.tgz", + "integrity": "sha512-4CWbR5vR9fMg23YqFOhr6t6WB1Fjt62d6xdFPyj8pxrYub7d+OgZaObMsoxaF9yBUHPMiPFK303v61PwAuGvZA==", "dependencies": { - "@vue/compiler-core": "3.4.23", - "@vue/shared": "3.4.23" + "@vue/compiler-core": "3.4.26", + "@vue/shared": "3.4.26" } }, "node_modules/@vue/language-core": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/@vue/language-core/-/language-core-2.0.13.tgz", - "integrity": "sha512-oQgM+BM66SU5GKtUMLQSQN0bxHFkFpLSSAiY87wVziPaiNQZuKVDt/3yA7GB9PiQw0y/bTNL0bOc0jM/siYjKg==", + "version": "2.0.16", + "resolved": "https://registry.npmjs.org/@vue/language-core/-/language-core-2.0.16.tgz", + "integrity": "sha512-Bc2sexRH99pznOph8mLw2BlRZ9edm7tW51kcBXgx8adAoOcZUWJj3UNSsdQ6H9Y8meGz7BoazVrVo/jUukIsPw==", "dependencies": { - "@volar/language-core": "2.2.0-alpha.8", + "@volar/language-core": "~2.2.0", "@vue/compiler-dom": "^3.4.0", "@vue/shared": "^3.4.0", "computeds": "^0.0.1", @@ -3936,51 +3780,51 @@ } }, "node_modules/@vue/shared": { - "version": "3.4.23", - "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.23.tgz", - "integrity": "sha512-wBQ0gvf+SMwsCQOyusNw/GoXPV47WGd1xB5A1Pgzy0sQ3Bi5r5xm3n+92y3gCnB3MWqnRDdvfkRGxhKtbBRNgg==" + "version": "3.4.26", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.26.tgz", + "integrity": "sha512-Fg4zwR0GNnjzodMt3KRy2AWGMKQXByl56+4HjN87soxLNU9P5xcJkstAlIeEF3cU6UYOzmJl1tV0dVPGIljCnQ==" }, "node_modules/@wormhole-foundation/sdk": { - "version": "0.5.3-beta.9", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk/-/sdk-0.5.3-beta.9.tgz", - "integrity": "sha512-hvVHbwwMd1WrcNSyTEQuhzrlH1ShHvQITXKTPz0be8xOjLVx5VQnu6mG8flkPJpXvfJ0C3e+SDKKgMPHeDH5TA==", - "dependencies": { - "@wormhole-foundation/sdk-algorand": "0.5.3-beta.9", - "@wormhole-foundation/sdk-algorand-core": "0.5.3-beta.9", - "@wormhole-foundation/sdk-algorand-tokenbridge": "0.5.3-beta.9", - "@wormhole-foundation/sdk-aptos": "0.5.3-beta.9", - "@wormhole-foundation/sdk-aptos-core": "0.5.3-beta.9", - "@wormhole-foundation/sdk-aptos-tokenbridge": "0.5.3-beta.9", - "@wormhole-foundation/sdk-base": "0.5.3-beta.9", - "@wormhole-foundation/sdk-connect": "0.5.3-beta.9", - "@wormhole-foundation/sdk-cosmwasm": "0.5.3-beta.9", - "@wormhole-foundation/sdk-cosmwasm-core": "0.5.3-beta.9", - "@wormhole-foundation/sdk-cosmwasm-ibc": "0.5.3-beta.9", - "@wormhole-foundation/sdk-cosmwasm-tokenbridge": "0.5.3-beta.9", - "@wormhole-foundation/sdk-definitions": "0.5.3-beta.9", - "@wormhole-foundation/sdk-evm": "0.5.3-beta.9", - "@wormhole-foundation/sdk-evm-cctp": "0.5.3-beta.9", - "@wormhole-foundation/sdk-evm-core": "0.5.3-beta.9", - "@wormhole-foundation/sdk-evm-portico": "0.5.3-beta.9", - "@wormhole-foundation/sdk-evm-tokenbridge": "0.5.3-beta.9", - "@wormhole-foundation/sdk-solana": "0.5.3-beta.9", - "@wormhole-foundation/sdk-solana-cctp": "0.5.3-beta.9", - "@wormhole-foundation/sdk-solana-core": "0.5.3-beta.9", - "@wormhole-foundation/sdk-solana-tokenbridge": "0.5.3-beta.9", - "@wormhole-foundation/sdk-sui": "0.5.3-beta.9", - "@wormhole-foundation/sdk-sui-core": "0.5.3-beta.9", - "@wormhole-foundation/sdk-sui-tokenbridge": "0.5.3-beta.9" + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk/-/sdk-0.6.5.tgz", + "integrity": "sha512-VIUznwXAnCRjH6VmlEQXqtaJwTOSM9XTwpb0ld7PxLkrTbYeGX2StSdDzGtxb4zLhxdEF6SOhDfX7WFc7k2b2g==", + "dependencies": { + "@wormhole-foundation/sdk-algorand": "0.6.5", + "@wormhole-foundation/sdk-algorand-core": "0.6.5", + "@wormhole-foundation/sdk-algorand-tokenbridge": "0.6.5", + "@wormhole-foundation/sdk-aptos": "0.6.5", + "@wormhole-foundation/sdk-aptos-core": "0.6.5", + "@wormhole-foundation/sdk-aptos-tokenbridge": "0.6.5", + "@wormhole-foundation/sdk-base": "0.6.5", + "@wormhole-foundation/sdk-connect": "0.6.5", + "@wormhole-foundation/sdk-cosmwasm": "0.6.5", + "@wormhole-foundation/sdk-cosmwasm-core": "0.6.5", + "@wormhole-foundation/sdk-cosmwasm-ibc": "0.6.5", + "@wormhole-foundation/sdk-cosmwasm-tokenbridge": "0.6.5", + "@wormhole-foundation/sdk-definitions": "0.6.5", + "@wormhole-foundation/sdk-evm": "0.6.5", + "@wormhole-foundation/sdk-evm-cctp": "0.6.5", + "@wormhole-foundation/sdk-evm-core": "0.6.5", + "@wormhole-foundation/sdk-evm-portico": "0.6.5", + "@wormhole-foundation/sdk-evm-tokenbridge": "0.6.5", + "@wormhole-foundation/sdk-solana": "0.6.5", + "@wormhole-foundation/sdk-solana-cctp": "0.6.5", + "@wormhole-foundation/sdk-solana-core": "0.6.5", + "@wormhole-foundation/sdk-solana-tokenbridge": "0.6.5", + "@wormhole-foundation/sdk-sui": "0.6.5", + "@wormhole-foundation/sdk-sui-core": "0.6.5", + "@wormhole-foundation/sdk-sui-tokenbridge": "0.6.5" }, "engines": { "node": ">=16" } }, "node_modules/@wormhole-foundation/sdk-algorand": { - "version": "0.5.3-beta.9", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-algorand/-/sdk-algorand-0.5.3-beta.9.tgz", - "integrity": "sha512-JXtyktJNG4+7583uFFIX5Gf4FtNqxqZlxl/UgtGZDI9QqHz8G/THQKO8/8ijqX5ozUgH03YvjVbsIEx+hYPsKw==", + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-algorand/-/sdk-algorand-0.6.5.tgz", + "integrity": "sha512-O9Z8alKmeSEW9uf9Ng/vwfM0NkDr/1Xuj5GVAP7n4QECU4KiFqqltyEq4mnA7xQ41d7bBj0/1qMDcZ2IRbPgjw==", "dependencies": { - "@wormhole-foundation/sdk-connect": "0.5.3-beta.9", + "@wormhole-foundation/sdk-connect": "0.6.5", "algosdk": "2.7.0" }, "engines": { @@ -3988,36 +3832,36 @@ } }, "node_modules/@wormhole-foundation/sdk-algorand-core": { - "version": "0.5.3-beta.9", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-algorand-core/-/sdk-algorand-core-0.5.3-beta.9.tgz", - "integrity": "sha512-RkssViB8Oax9PPbf1NwRJzpGwP3MWUXLjohR/2tBr2WFA6MN+Tt0+jt+wSMW0WU8fD46ZpqTAZ1VHy9x3SVJhg==", + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-algorand-core/-/sdk-algorand-core-0.6.5.tgz", + "integrity": "sha512-OkvliDuwAu0O9Hx6/tFT0t7Q7Vvy7B3vQaUaW++n+FPWLSWcGNbOSSAPHRpnycxQvLznmKEisdGqDV6ZNwRTvA==", "dependencies": { - "@wormhole-foundation/sdk-algorand": "0.5.3-beta.9", - "@wormhole-foundation/sdk-connect": "0.5.3-beta.9" + "@wormhole-foundation/sdk-algorand": "0.6.5", + "@wormhole-foundation/sdk-connect": "0.6.5" }, "engines": { "node": ">=16" } }, "node_modules/@wormhole-foundation/sdk-algorand-tokenbridge": { - "version": "0.5.3-beta.9", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-algorand-tokenbridge/-/sdk-algorand-tokenbridge-0.5.3-beta.9.tgz", - "integrity": "sha512-XJucRhpmd6ttyCDPZrDaQ5afGlB15jHotG3e3GdFssxPCUIts0R8y5mNSf5yL/+wk3FPMAO9giNIMxxFz0kGbA==", + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-algorand-tokenbridge/-/sdk-algorand-tokenbridge-0.6.5.tgz", + "integrity": "sha512-8nIxVf/+ewfHtK1ve76cTu8by6N/B6kYgzmvddwzdFtNauI4UYvBhhdpxyT8/rWdjoTfEaoxl3Y7NZPStW7QVw==", "dependencies": { - "@wormhole-foundation/sdk-algorand": "0.5.3-beta.9", - "@wormhole-foundation/sdk-algorand-core": "0.5.3-beta.9", - "@wormhole-foundation/sdk-connect": "0.5.3-beta.9" + "@wormhole-foundation/sdk-algorand": "0.6.5", + "@wormhole-foundation/sdk-algorand-core": "0.6.5", + "@wormhole-foundation/sdk-connect": "0.6.5" }, "engines": { "node": ">=16" } }, "node_modules/@wormhole-foundation/sdk-aptos": { - "version": "0.5.3-beta.9", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-aptos/-/sdk-aptos-0.5.3-beta.9.tgz", - "integrity": "sha512-q5wAXu1JgyS+XzK6xf10cAyclZfpLAuqtmvobrp3x5TBmmgtHix1qOc2X1FCI/ssXyyb6XJY5VGusGZJBWgcdg==", + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-aptos/-/sdk-aptos-0.6.5.tgz", + "integrity": "sha512-Lon7tdTwAI4y+Wo3w/jBWHlZNml4URQhBVRwkYoFbCmS4PvxMcWGxqmeAWLnn1yXzXdi9uk0B1mDEWM03/YzpA==", "dependencies": { - "@wormhole-foundation/sdk-connect": "0.5.3-beta.9", + "@wormhole-foundation/sdk-connect": "0.6.5", "aptos": "1.21.0" }, "engines": { @@ -4025,44 +3869,44 @@ } }, "node_modules/@wormhole-foundation/sdk-aptos-core": { - "version": "0.5.3-beta.9", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-aptos-core/-/sdk-aptos-core-0.5.3-beta.9.tgz", - "integrity": "sha512-ii3V4CAiq82n16mgWl12mXHWbvzbPtuo/y9DVgdY1O/GECgBk4mwlR8ge8qyzwtPpqyGyjOt+tCFcDKkRC8MXQ==", + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-aptos-core/-/sdk-aptos-core-0.6.5.tgz", + "integrity": "sha512-EBEZ++IM4jApjyP+GCSwODVb7Zuet6PiS7zJaOhD2mkGVdfbuQzPZgCzNmP1QDm2hm9BK/tgSQZMd4FDJW6fhw==", "dependencies": { - "@wormhole-foundation/sdk-aptos": "0.5.3-beta.9", - "@wormhole-foundation/sdk-connect": "0.5.3-beta.9" + "@wormhole-foundation/sdk-aptos": "0.6.5", + "@wormhole-foundation/sdk-connect": "0.6.5" }, "engines": { "node": ">=16" } }, "node_modules/@wormhole-foundation/sdk-aptos-tokenbridge": { - "version": "0.5.3-beta.9", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-aptos-tokenbridge/-/sdk-aptos-tokenbridge-0.5.3-beta.9.tgz", - "integrity": "sha512-SRQswrO6qSoqjGYjp0H/91zEE76YFbotTAKDBJUpaaTF1avIOld0t2m7pVmY5q62kP1lZJoAOcbTa9vt1gduog==", + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-aptos-tokenbridge/-/sdk-aptos-tokenbridge-0.6.5.tgz", + "integrity": "sha512-994fOd8ALhQgeR4BEckF9D2acHpf2//cIkBmANw04sMiiQy/5K4wq6paGCsvEzP65CibIqWNlpSc3TYWR8KfLg==", "dependencies": { - "@wormhole-foundation/sdk-aptos": "0.5.3-beta.9", - "@wormhole-foundation/sdk-connect": "0.5.3-beta.9" + "@wormhole-foundation/sdk-aptos": "0.6.5", + "@wormhole-foundation/sdk-connect": "0.6.5" }, "engines": { "node": ">=16" } }, "node_modules/@wormhole-foundation/sdk-base": { - "version": "0.5.3-beta.9", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-base/-/sdk-base-0.5.3-beta.9.tgz", - "integrity": "sha512-VGGvKwRHMXAgtIzhpTNv6tLl5catPl5kumXXktVcvp4KkuT4DPC+wOoobjQNyA+3uNjMtvOPhbIeZ5z3d59WFg==", + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-base/-/sdk-base-0.6.5.tgz", + "integrity": "sha512-4NCGACcAICr0QEqUnytWxIXYMWpbFnknOm6EA3v889fUP/nnMdsubWqNuC+viAMSXHm3EBjVLUgt68qmK+9wZw==", "dependencies": { "@scure/base": "^1.1.3" } }, "node_modules/@wormhole-foundation/sdk-connect": { - "version": "0.5.3-beta.9", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-connect/-/sdk-connect-0.5.3-beta.9.tgz", - "integrity": "sha512-hrdHm7vipmHpZ8BwYwhEnoeFIqUN8e+9yf7uQ2JMU7GXnDhb70bOYWhe7MHf0+ytz5eXg0Kgj4x83BfHIDIWkQ==", + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-connect/-/sdk-connect-0.6.5.tgz", + "integrity": "sha512-ClSWIoxzTxJIc399fozQ7cj98BiF4cXJyboqfBK73AZ0aBYos5sMDDN44NR10xEUSUiTry0XlTjfsI9wIdB0kQ==", "dependencies": { - "@wormhole-foundation/sdk-base": "0.5.3-beta.9", - "@wormhole-foundation/sdk-definitions": "0.5.3-beta.9", + "@wormhole-foundation/sdk-base": "0.6.5", + "@wormhole-foundation/sdk-definitions": "0.6.5", "axios": "^1.4.0" }, "engines": { @@ -4070,15 +3914,15 @@ } }, "node_modules/@wormhole-foundation/sdk-cosmwasm": { - "version": "0.5.3-beta.9", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-cosmwasm/-/sdk-cosmwasm-0.5.3-beta.9.tgz", - "integrity": "sha512-xQHPYiQnVA1w3Dc8XUf1pAYrkuj8fSJax+kGRZ24BgfzZHTtPtAByQBUlzfiLT2z6Mqp39yq8uEyGmUKso/FLA==", + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-cosmwasm/-/sdk-cosmwasm-0.6.5.tgz", + "integrity": "sha512-NlES9hFrCfNauEW7iN/14QRYu5+Kb1raw/b5YvJJn/tOfXzuhAanWFLAORbUBVPiow8gOn5CHc9VHDgutcizBw==", "dependencies": { "@cosmjs/cosmwasm-stargate": "^0.32.0", "@cosmjs/proto-signing": "^0.32.0", "@cosmjs/stargate": "^0.32.0", "@injectivelabs/sdk-ts": "^1.14.4", - "@wormhole-foundation/sdk-connect": "0.5.3-beta.9", + "@wormhole-foundation/sdk-connect": "0.6.5", "cosmjs-types": "^0.9.0" }, "engines": { @@ -4086,31 +3930,31 @@ } }, "node_modules/@wormhole-foundation/sdk-cosmwasm-core": { - "version": "0.5.3-beta.9", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-cosmwasm-core/-/sdk-cosmwasm-core-0.5.3-beta.9.tgz", - "integrity": "sha512-cCLatxY7K8L1Mm6kYviwh2ijpNPwsHuolsjnqtQJ4Jhshvt492BHa/tUrz/J7B1qhkXda2A1ItTDpx9LOtq5Tg==", + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-cosmwasm-core/-/sdk-cosmwasm-core-0.6.5.tgz", + "integrity": "sha512-fjN67fSudXLiz5s43+C04medxUaoaHyght37bIOxBf4pttLygeNvh6v/GKyo+1gkILLxNdGlj3XxwvNV6GIBlQ==", "dependencies": { "@cosmjs/cosmwasm-stargate": "^0.32.0", "@cosmjs/stargate": "^0.32.0", "@injectivelabs/sdk-ts": "^1.14.4", - "@wormhole-foundation/sdk-connect": "0.5.3-beta.9", - "@wormhole-foundation/sdk-cosmwasm": "0.5.3-beta.9" + "@wormhole-foundation/sdk-connect": "0.6.5", + "@wormhole-foundation/sdk-cosmwasm": "0.6.5" }, "engines": { "node": ">=16" } }, "node_modules/@wormhole-foundation/sdk-cosmwasm-ibc": { - "version": "0.5.3-beta.9", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-cosmwasm-ibc/-/sdk-cosmwasm-ibc-0.5.3-beta.9.tgz", - "integrity": "sha512-r96esxRgZ/A8afdS4L3w7B8jjTZG33xTGO6A/8uilSCIl3nB9+Nb0zyOe3chxqkUH/4puT8G7dwb3XYuLWaqeg==", + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-cosmwasm-ibc/-/sdk-cosmwasm-ibc-0.6.5.tgz", + "integrity": "sha512-RElcjipXrBhLMNQlASLyyZIx0FSVrqQyUTwz8kK23d8KqA8MAzGYyROyu0++RD1rpcdbNcZ6J6xKJpE9c0bYpQ==", "dependencies": { "@cosmjs/cosmwasm-stargate": "^0.32.0", "@cosmjs/stargate": "^0.32.0", "@injectivelabs/sdk-ts": "^1.14.4", - "@wormhole-foundation/sdk-connect": "0.5.3-beta.9", - "@wormhole-foundation/sdk-cosmwasm": "0.5.3-beta.9", - "@wormhole-foundation/sdk-cosmwasm-core": "0.5.3-beta.9", + "@wormhole-foundation/sdk-connect": "0.6.5", + "@wormhole-foundation/sdk-cosmwasm": "0.6.5", + "@wormhole-foundation/sdk-cosmwasm-core": "0.6.5", "cosmjs-types": "^0.9.0" }, "engines": { @@ -4118,39 +3962,39 @@ } }, "node_modules/@wormhole-foundation/sdk-cosmwasm-tokenbridge": { - "version": "0.5.3-beta.9", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-cosmwasm-tokenbridge/-/sdk-cosmwasm-tokenbridge-0.5.3-beta.9.tgz", - "integrity": "sha512-ZFiOe+ARvU/ZYaJXibfVfHC5gdNvXX0TIGeOovjdz+HzipJIY+CfJJ97OFsexdxxEqrMoDLLeXqHxF0qN4aFjA==", + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-cosmwasm-tokenbridge/-/sdk-cosmwasm-tokenbridge-0.6.5.tgz", + "integrity": "sha512-m39OMHvgWNWQna6pHu5mrzZP6VTlHv0kMZJ3mpBE3/3sGyVEP/QqhjN4Vvbn6MUOZYMLIZ/fSzLN1W2bB371wQ==", "dependencies": { "@cosmjs/cosmwasm-stargate": "^0.32.0", "@injectivelabs/sdk-ts": "^1.14.4", - "@wormhole-foundation/sdk-connect": "0.5.3-beta.9", - "@wormhole-foundation/sdk-cosmwasm": "0.5.3-beta.9" + "@wormhole-foundation/sdk-connect": "0.6.5", + "@wormhole-foundation/sdk-cosmwasm": "0.6.5" }, "engines": { "node": ">=16" } }, "node_modules/@wormhole-foundation/sdk-definitions": { - "version": "0.5.3-beta.9", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-definitions/-/sdk-definitions-0.5.3-beta.9.tgz", - "integrity": "sha512-xc8pqUlLjpHocQDX32xQJSbbKAthKWwY1Ez0nWSCSA9XMWdgPnZ56f0AvBZulusy2gmrww0rHkteYcOkO/Tp6w==", + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-definitions/-/sdk-definitions-0.6.5.tgz", + "integrity": "sha512-DmFs8v3WcO6bdvM4hcSS5WU2odUb4ZdD0HXkbm3SDCwhPAcexLg2jdf9fzSm67SDTovZljZOLrOgRO3Wtv5COQ==", "dependencies": { "@noble/curves": "^1.4.0", "@noble/hashes": "^1.3.1", - "@wormhole-foundation/sdk-base": "0.5.3-beta.9" + "@wormhole-foundation/sdk-base": "0.6.5" } }, "node_modules/@wormhole-foundation/sdk-definitions-ntt": { - "resolved": "definitions", + "resolved": "sdk/definitions", "link": true }, "node_modules/@wormhole-foundation/sdk-evm": { - "version": "0.5.3-beta.9", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-evm/-/sdk-evm-0.5.3-beta.9.tgz", - "integrity": "sha512-bbBFxNPWbgfkK0+e/jGw0tLFbtVmhk+oFL1GkbNc4NhFys3cGb9W6X5xYSqNON4lo5rzO3UNT8cth7ddSiGmBg==", + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-evm/-/sdk-evm-0.6.5.tgz", + "integrity": "sha512-1tyjssku+3GfyoXgeCQi52ZehUkAY6rDFxymANAqipuP3mHazcdy01/lWGflZh0AudYsqnx0fkev01RrBHzPLg==", "dependencies": { - "@wormhole-foundation/sdk-connect": "0.5.3-beta.9", + "@wormhole-foundation/sdk-connect": "0.6.5", "ethers": "^6.5.1" }, "engines": { @@ -4158,12 +4002,12 @@ } }, "node_modules/@wormhole-foundation/sdk-evm-cctp": { - "version": "0.5.3-beta.9", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-evm-cctp/-/sdk-evm-cctp-0.5.3-beta.9.tgz", - "integrity": "sha512-6UWIAK5BEpCEaXpbGz6SgRth94Dm+b9w9kE+jLVmO65fYVb/Ycm6GVyXnqi87tP7xj18E+aOe1fsiSQdpsXfGg==", + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-evm-cctp/-/sdk-evm-cctp-0.6.5.tgz", + "integrity": "sha512-hwDVISrD8+XJ2HKKrkUnl3Qpcbp1KsvRjOsqXHwxvb4fZUJM/bELvoLQFxW4kruXTgVc3YiWBTQz8THOV0M2bg==", "dependencies": { - "@wormhole-foundation/sdk-connect": "0.5.3-beta.9", - "@wormhole-foundation/sdk-evm": "0.5.3-beta.9", + "@wormhole-foundation/sdk-connect": "0.6.5", + "@wormhole-foundation/sdk-evm": "0.6.5", "ethers": "^6.5.1" }, "engines": { @@ -4171,12 +4015,12 @@ } }, "node_modules/@wormhole-foundation/sdk-evm-core": { - "version": "0.5.3-beta.9", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-evm-core/-/sdk-evm-core-0.5.3-beta.9.tgz", - "integrity": "sha512-L/R26jrRUnn7/Bs0fuxAj6xdZFZj66GSfNkVnF7m+W2V6AgKGnvwuCoHxMMyF3QFg/2nS55Gl3GSvCOn7OErzg==", + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-evm-core/-/sdk-evm-core-0.6.5.tgz", + "integrity": "sha512-vrj417QWkXHuBd5qFUWKg/qRsnv+kHDGaAWB3KSwK1FZgMMPG4izD8By9DP+k8oe0GZbbcaWT1yBZb/2QPwtZQ==", "dependencies": { - "@wormhole-foundation/sdk-connect": "0.5.3-beta.9", - "@wormhole-foundation/sdk-evm": "0.5.3-beta.9", + "@wormhole-foundation/sdk-connect": "0.6.5", + "@wormhole-foundation/sdk-evm": "0.6.5", "ethers": "^6.5.1" }, "engines": { @@ -4184,18 +4028,18 @@ } }, "node_modules/@wormhole-foundation/sdk-evm-ntt": { - "resolved": "evm", + "resolved": "sdk/evm", "link": true }, "node_modules/@wormhole-foundation/sdk-evm-portico": { - "version": "0.5.3-beta.9", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-evm-portico/-/sdk-evm-portico-0.5.3-beta.9.tgz", - "integrity": "sha512-gViZKMy0UKjPEynMohLKe4g5j8IbqQT9+rURofiaXWonB7bFjOMGwnmbDeG94Yg88/sZtXP/UFzxZk0AZPwkPQ==", - "dependencies": { - "@wormhole-foundation/sdk-connect": "0.5.3-beta.9", - "@wormhole-foundation/sdk-evm": "0.5.3-beta.9", - "@wormhole-foundation/sdk-evm-core": "0.5.3-beta.9", - "@wormhole-foundation/sdk-evm-tokenbridge": "0.5.3-beta.9", + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-evm-portico/-/sdk-evm-portico-0.6.5.tgz", + "integrity": "sha512-qri2VbgmCBkpaLRJf9xq/cKyWOZ0BJRHiOQHuIWvfHzjCtvX4DEFVRNygKAKmPrNbA3a05s7khx+UN4ySWmePw==", + "dependencies": { + "@wormhole-foundation/sdk-connect": "0.6.5", + "@wormhole-foundation/sdk-evm": "0.6.5", + "@wormhole-foundation/sdk-evm-core": "0.6.5", + "@wormhole-foundation/sdk-evm-tokenbridge": "0.6.5", "ethers": "^6.5.1" }, "engines": { @@ -4203,13 +4047,13 @@ } }, "node_modules/@wormhole-foundation/sdk-evm-tokenbridge": { - "version": "0.5.3-beta.9", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-evm-tokenbridge/-/sdk-evm-tokenbridge-0.5.3-beta.9.tgz", - "integrity": "sha512-CmMd4GikFgRXU/Kq1DN4qDFMbuE6w9QTQQQaZlc4hVs8LbtZs+MG1XsQ9/2jB+K+XL3lH/GkRwz3oR/JbkvM1g==", + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-evm-tokenbridge/-/sdk-evm-tokenbridge-0.6.5.tgz", + "integrity": "sha512-ibg1BIktFVOBsqeJlvV69r7+XQt3IPt3GS8r+NkPbnNyGho09EfKBNctmYwOXydm+SDW9aqwUj0sE0hrkzTPJg==", "dependencies": { - "@wormhole-foundation/sdk-connect": "0.5.3-beta.9", - "@wormhole-foundation/sdk-evm": "0.5.3-beta.9", - "@wormhole-foundation/sdk-evm-core": "0.5.3-beta.9", + "@wormhole-foundation/sdk-connect": "0.6.5", + "@wormhole-foundation/sdk-evm": "0.6.5", + "@wormhole-foundation/sdk-evm-core": "0.6.5", "ethers": "^6.5.1" }, "engines": { @@ -4217,53 +4061,53 @@ } }, "node_modules/@wormhole-foundation/sdk-examples-ntt": { - "resolved": "examples", + "resolved": "sdk/examples", "link": true }, "node_modules/@wormhole-foundation/sdk-route-ntt": { - "resolved": "route", + "resolved": "sdk/route", "link": true }, "node_modules/@wormhole-foundation/sdk-solana": { - "version": "0.5.3-beta.9", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-solana/-/sdk-solana-0.5.3-beta.9.tgz", - "integrity": "sha512-XCuICnmapSkKF8r2mCcuOWiFpWy1qyp5rfJkqn6qbJKVYSD6BocDAFuEeq+UZIvzxs33HzeTRi3YEtV8U5OTYw==", + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-solana/-/sdk-solana-0.6.5.tgz", + "integrity": "sha512-rgCeagnCkZWTapdrizRUiGdTS4nDWMAe6GTQwCmrHzWIHSlHCByAygG4C8iBo4rvQEfctYRsz0JaDL0onUqG1w==", "dependencies": { "@coral-xyz/anchor": "0.29.0", "@coral-xyz/borsh": "0.29.0", "@solana/spl-token": "0.3.9", "@solana/web3.js": "1.91.7", - "@wormhole-foundation/sdk-connect": "0.5.3-beta.9" + "@wormhole-foundation/sdk-connect": "0.6.5" }, "engines": { "node": ">=16" } }, "node_modules/@wormhole-foundation/sdk-solana-cctp": { - "version": "0.5.3-beta.9", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-solana-cctp/-/sdk-solana-cctp-0.5.3-beta.9.tgz", - "integrity": "sha512-LOtm5jIIx8ukcX/phRTB/dYux9mvA/VlUZJjfBcWTfjg8PTSpbSifC0s/PeevyXVXrPPFmJ932hRJ3asi7FRkg==", + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-solana-cctp/-/sdk-solana-cctp-0.6.5.tgz", + "integrity": "sha512-3BcFYmsFMcvFiR/Fi07V4b3oDCwhU4n0EZh5g9N2XG3IWxhzOIZPo3aYIyONNLSvkSIKVt+6sYpM5CeDhCmKzQ==", "dependencies": { "@coral-xyz/anchor": "0.29.0", "@solana/spl-token": "0.3.9", "@solana/web3.js": "1.91.7", - "@wormhole-foundation/sdk-connect": "0.5.3-beta.9", - "@wormhole-foundation/sdk-solana": "0.5.3-beta.9" + "@wormhole-foundation/sdk-connect": "0.6.5", + "@wormhole-foundation/sdk-solana": "0.6.5" }, "engines": { "node": ">=16" } }, "node_modules/@wormhole-foundation/sdk-solana-core": { - "version": "0.5.3-beta.9", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-solana-core/-/sdk-solana-core-0.5.3-beta.9.tgz", - "integrity": "sha512-+TDC0cUAI9eL+io4sAHaa9eJmImROj2FUMwkwkAZwH0lCujREZsSgQD+wRQfVr3bbRHMsb9wyI6AifHWSLZAqw==", + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-solana-core/-/sdk-solana-core-0.6.5.tgz", + "integrity": "sha512-/NeuJedPvftSXgJcMyqY3tbf5bDTpR4FBLfNdjW/poyXrtrYs0amBeA+akTSbBCNhxsmTDcW+UKGMbdO01QAKA==", "dependencies": { "@coral-xyz/anchor": "0.29.0", "@coral-xyz/borsh": "0.29.0", "@solana/web3.js": "1.91.7", - "@wormhole-foundation/sdk-connect": "0.5.3-beta.9", - "@wormhole-foundation/sdk-solana": "0.5.3-beta.9" + "@wormhole-foundation/sdk-connect": "0.6.5", + "@wormhole-foundation/sdk-solana": "0.6.5" }, "engines": { "node": ">=16" @@ -4274,55 +4118,55 @@ "link": true }, "node_modules/@wormhole-foundation/sdk-solana-tokenbridge": { - "version": "0.5.3-beta.9", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-solana-tokenbridge/-/sdk-solana-tokenbridge-0.5.3-beta.9.tgz", - "integrity": "sha512-t/xQuVCpcsgMycrFPwKlxedRXbT1eTFyoyBBClbHP/jx+zmpngpKTJTJu1T7H4ncVQTRSDqUKnsXajQpiLZ7XQ==", + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-solana-tokenbridge/-/sdk-solana-tokenbridge-0.6.5.tgz", + "integrity": "sha512-+z7n/tzS1cmo/kHt6LF5A0f/nT/1ICzEXbus1DtSSHoEuYmSf4zUO4s8eJ2ylYwqkoEKOYpnJGr/xPGcVPuh0g==", "dependencies": { "@coral-xyz/anchor": "0.29.0", "@solana/spl-token": "0.3.9", "@solana/web3.js": "1.91.7", - "@wormhole-foundation/sdk-connect": "0.5.3-beta.9", - "@wormhole-foundation/sdk-solana": "0.5.3-beta.9", - "@wormhole-foundation/sdk-solana-core": "0.5.3-beta.9" + "@wormhole-foundation/sdk-connect": "0.6.5", + "@wormhole-foundation/sdk-solana": "0.6.5", + "@wormhole-foundation/sdk-solana-core": "0.6.5" }, "engines": { "node": ">=16" } }, "node_modules/@wormhole-foundation/sdk-sui": { - "version": "0.5.3-beta.9", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-sui/-/sdk-sui-0.5.3-beta.9.tgz", - "integrity": "sha512-xDntcLaargM6VCjdNBTPrYTmQNqibN7CfOyG9McquCNmOqYFAjQT7+Ol9A0ILibrP5NaXWX24jNbw9fUcUFzbw==", + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-sui/-/sdk-sui-0.6.5.tgz", + "integrity": "sha512-KctbvwUiFEqNwOZknwCwD7+2UiLlBHKkQwbF9ZXE9mAotPu70iVybtq5H/7ebBDnDpWpZ0tDfoxCjVLROMA35A==", "dependencies": { "@mysten/sui.js": "^0.50.1", - "@wormhole-foundation/sdk-connect": "0.5.3-beta.9" + "@wormhole-foundation/sdk-connect": "0.6.5" }, "engines": { "node": ">=16" } }, "node_modules/@wormhole-foundation/sdk-sui-core": { - "version": "0.5.3-beta.9", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-sui-core/-/sdk-sui-core-0.5.3-beta.9.tgz", - "integrity": "sha512-O2v0JJt8ZxQcJTjtONWtdpcr1Ab54jL+CZuJDBfHsXehAnApjd/oQxPPY0VsJchJmHt8nlrWzascT0lkF+Y1bg==", + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-sui-core/-/sdk-sui-core-0.6.5.tgz", + "integrity": "sha512-23fKnni1jx+sQi23bOZenQ8MTFDbTq7zBlI14JynDiOBnXFYZtixfRrhEueOrpHCSoh4nco4N+JkNWhMpQw/Kw==", "dependencies": { "@mysten/sui.js": "^0.50.1", - "@wormhole-foundation/sdk-connect": "0.5.3-beta.9", - "@wormhole-foundation/sdk-sui": "0.5.3-beta.9" + "@wormhole-foundation/sdk-connect": "0.6.5", + "@wormhole-foundation/sdk-sui": "0.6.5" }, "engines": { "node": ">=16" } }, "node_modules/@wormhole-foundation/sdk-sui-tokenbridge": { - "version": "0.5.3-beta.9", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-sui-tokenbridge/-/sdk-sui-tokenbridge-0.5.3-beta.9.tgz", - "integrity": "sha512-8fTVUa9PWgt/A4pGdL+5oqmHIovv5sUVY3KkRpBvALupZg+cs4AjDZ+JqOFi4zSNVNWntLwB36m0ZneAF4qRVQ==", + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-sui-tokenbridge/-/sdk-sui-tokenbridge-0.6.5.tgz", + "integrity": "sha512-vKHyatWo/iweR8Jr1jjCMmQJKdM+D9q+X3DUvJonZJAAkKNn0A+FqF0eyHeXvUINIY995yURpI3EDvyIIHDsrw==", "dependencies": { "@mysten/sui.js": "^0.50.1", - "@wormhole-foundation/sdk-connect": "0.5.3-beta.9", - "@wormhole-foundation/sdk-sui": "0.5.3-beta.9", - "@wormhole-foundation/sdk-sui-core": "0.5.3-beta.9" + "@wormhole-foundation/sdk-connect": "0.6.5", + "@wormhole-foundation/sdk-sui": "0.6.5", + "@wormhole-foundation/sdk-sui-core": "0.6.5" }, "engines": { "node": ">=16" @@ -4985,18 +4829,6 @@ "integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==", "dev": true }, - "node_modules/@wormhole-foundation/wormchain-sdk/node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "peer": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, "node_modules/@wormhole-foundation/wormchain-sdk/node_modules/convert-source-map": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", @@ -5844,52 +5676,12 @@ "typedarray-to-buffer": "^3.1.5" } }, - "node_modules/@wormhole-foundation/wormchain-sdk/node_modules/ws": { - "version": "7.5.9", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", - "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", - "dev": true, - "engines": { - "node": ">=8.3.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, "node_modules/@wormhole-foundation/wormchain-sdk/node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, - "node_modules/@wormhole-foundation/wormchain-sdk/node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, - "peer": true, - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@wormhole-foundation/wormchain-sdk/node_modules/yargs-parser": { "version": "20.2.9", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", @@ -5955,7 +5747,6 @@ "version": "8.11.3", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", - "dev": true, "bin": { "acorn": "bin/acorn" }, @@ -5987,7 +5778,7 @@ "node": ">=0.4.0" } }, - "node_modules/acorn-globals/node_modules/acorn-walk": { + "node_modules/acorn-walk": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", @@ -5997,15 +5788,6 @@ "node": ">=0.4.0" } }, - "node_modules/acorn-walk": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.2.tgz", - "integrity": "sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, "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", @@ -6173,10 +5955,19 @@ "sprintf-js": "~1.0.2" } }, - "node_modules/array-back": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz", - "integrity": "sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==", + "node_modules/aria-query": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz", + "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==", + "peer": true, + "dependencies": { + "dequal": "^2.0.3" + } + }, + "node_modules/array-back": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz", + "integrity": "sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==", "dev": true, "engines": { "node": ">=6" @@ -6197,6 +5988,15 @@ "proxy-from-env": "^1.1.0" } }, + "node_modules/axobject-query": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.0.0.tgz", + "integrity": "sha512-+60uv1hiVFhHZeO+Lz0RYzsVHy5Wr1ayX0mwda9KPDVLNJgZ1T9Ny7VmFbLDzxsH0D87I86vgj3gFrjTJUYznw==", + "peer": true, + "dependencies": { + "dequal": "^2.0.3" + } + }, "node_modules/babel-jest": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", @@ -6440,6 +6240,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, "dependencies": { "fill-range": "^7.0.1" }, @@ -6615,6 +6416,34 @@ "node": ">=0.10.0" } }, + "node_modules/bun-types": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/bun-types/-/bun-types-1.1.0.tgz", + "integrity": "sha512-GhMDD7TosdJzQPGUOcQD5PZshvXVxDfwGAZs2dq+eSaPsRn3iUCzvpFlsg7Q51bXVzLAUs+FWHlnmpgZ5UggIg==", + "dev": true, + "dependencies": { + "@types/node": "~20.11.3", + "@types/ws": "~8.5.10" + } + }, + "node_modules/bun-types/node_modules/@types/node": { + "version": "20.11.30", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.30.tgz", + "integrity": "sha512-dHM6ZxwlmuZaRmUPfv1p+KrdD1Dci04FbdEm/9wEMouFqxYoFl5aMkt0VMAUtYRQDyYvD41WJLukhq/ha3YuTw==", + "dev": true, + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/bun-types/node_modules/@types/ws": { + "version": "8.5.10", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.10.tgz", + "integrity": "sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, "node_modules/cacheable-lookup": { "version": "5.0.4", "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", @@ -6640,20 +6469,6 @@ "node": ">=8" } }, - "node_modules/cacheable-request/node_modules/get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "dependencies": { - "pump": "^3.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -6676,9 +6491,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001600", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001600.tgz", - "integrity": "sha512-+2S9/2JFhYmYaDpZvo0lKkfvuKIglrx68MwOBqMGHhQsNkLjB5xtc/TGoEPs+MxjSyN/72qer2g97nzR641mOQ==", + "version": "1.0.30001612", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001612.tgz", + "integrity": "sha512-lFgnZ07UhaCcsSZgWW0K5j4e69dK1u/ltrL9lTUiFOwNHs12S3UMIEYgBV0Z6C6hRDev7iRnMzzYmKabYdXF9g==", "dev": true, "funding": [ { @@ -6753,19 +6568,18 @@ "dev": true, "peer": true }, + "node_modules/cli": { + "resolved": "cli", + "link": true + }, "node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, - "peer": true, + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", "dependencies": { "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", + "strip-ansi": "^6.0.0", "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" } }, "node_modules/clone-response": { @@ -6790,10 +6604,27 @@ "node": ">= 0.12.0" } }, - "node_modules/code-block-writer": { - "version": "13.0.1", - "resolved": "https://registry.npmjs.org/code-block-writer/-/code-block-writer-13.0.1.tgz", - "integrity": "sha512-c5or4P6erEA69TxaxTNcHUNcIn+oyxSRTOWV+pSYF+z4epXqNvwvJ70XPGjPNgue83oAFAPBRQYwpAJ/Hpe/Sg==" + "node_modules/code-red": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/code-red/-/code-red-1.0.4.tgz", + "integrity": "sha512-7qJWqItLA8/VPVlKJlFXU+NBlo/qyfs39aJcuMT/2ere32ZqvF5OSxgdM5xOfJJ7O429gg2HM47y8v9P+9wrNw==", + "peer": true, + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.15", + "@types/estree": "^1.0.1", + "acorn": "^8.10.0", + "estree-walker": "^3.0.3", + "periscopic": "^3.1.0" + } + }, + "node_modules/code-red/node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "peer": true, + "dependencies": { + "@types/estree": "^1.0.0" + } }, "node_modules/collect-v8-coverage": { "version": "1.0.2", @@ -6988,41 +6819,6 @@ "copyup": "copyfiles" } }, - "node_modules/copyfiles/node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "node_modules/copyfiles/node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/copyfiles/node_modules/yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", - "engines": { - "node": ">=10" - } - }, "node_modules/core-util-is": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", @@ -7120,6 +6916,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/css-tree": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz", + "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==", + "peer": true, + "dependencies": { + "mdn-data": "2.0.30", + "source-map-js": "^1.0.1" + }, + "engines": { + "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0" + } + }, "node_modules/cssom": { "version": "0.4.4", "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz", @@ -7260,9 +7069,9 @@ } }, "node_modules/dedent": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.1.tgz", - "integrity": "sha512-+LxW+KLWxu3HW3M2w2ympwtqPrqYRzU8fqi6Fhd18fBALe15blJPI/I4+UHveMVG6lJqB4JNd4UG0S5cnVHwIg==", + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.3.tgz", + "integrity": "sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ==", "dev": true, "peer": true, "peerDependencies": { @@ -7274,6 +7083,11 @@ } } }, + "node_modules/dedent-js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dedent-js/-/dedent-js-1.0.1.tgz", + "integrity": "sha512-OUepMozQULMLUmhxS95Vudo0jb0UchLimi3+pQ2plj61Fcy8axbP9hbiD4Sz6DPqn6XG3kfmziVfQ1rSys5AJQ==" + }, "node_modules/deep-extend": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", @@ -7352,6 +7166,15 @@ "node": ">=0.4.0" } }, + "node_modules/dequal": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", + "peer": true, + "engines": { + "node": ">=6" + } + }, "node_modules/detect-newline": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", @@ -7423,9 +7246,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.722", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.722.tgz", - "integrity": "sha512-5nLE0TWFFpZ80Crhtp4pIp8LXCztjYX41yUcV6b+bKR2PqzjskTMOOlBi1VjBHlvHwS+4gar7kNKOrsbsewEZQ==", + "version": "1.4.749", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.749.tgz", + "integrity": "sha512-LRMMrM9ITOvue0PoBrvNIraVmuDbJV5QC9ierz/z5VilMdPOVMjOtpICNld3PuXuTZ3CHH/UPxX9gHhAPwi+0Q==", "dev": true, "peer": true }, @@ -7716,9 +7539,9 @@ } }, "node_modules/ethers": { - "version": "6.11.1", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.11.1.tgz", - "integrity": "sha512-mxTAE6wqJQAbp5QAe/+o+rXOID7Nw91OZXvgpjDa1r4fAbq2Nu314oEZSbjoRLacuCzs7kUC3clEvkCQowffGg==", + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.12.0.tgz", + "integrity": "sha512-zL5NlOTjML239gIvtVJuaSk0N9GQLi1Hom3ZWUszE5lDTQE/IVB62mrPkQ2W1bGcZwVGSLaetQbWNQSvI4rGDQ==", "funding": [ { "type": "individual", @@ -7769,6 +7592,31 @@ "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/ethers/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" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "node_modules/ethjs-util": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz", @@ -7820,6 +7668,19 @@ "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, + "node_modules/execa/node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "peer": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/exit": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", @@ -7860,21 +7721,6 @@ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true }, - "node_modules/fast-glob": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", - "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -7886,14 +7732,6 @@ "resolved": "https://registry.npmjs.org/fast-stable-stringify/-/fast-stable-stringify-1.0.0.tgz", "integrity": "sha512-wpYMUmFu5f00Sm0cj2pfivpmawLZ0NKdviQ4w9zJeR8JVtOpOxHmLaJuj0vxvGqMJQWyP/COUkF75/57OKyRag==" }, - "node_modules/fastq": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", - "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", - "dependencies": { - "reusify": "^1.0.4" - } - }, "node_modules/fb-watchman": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", @@ -7913,6 +7751,7 @@ "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, "dependencies": { "to-regex-range": "^5.0.1" }, @@ -7992,6 +7831,15 @@ "node": ">=6 <7 || >=8" } }, + "node_modules/fs-extra/node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "engines": { + "node": ">= 4.0.0" + } + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -8066,13 +7914,14 @@ } }, "node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "dev": true, - "peer": true, + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dependencies": { + "pump": "^3.0.0" + }, "engines": { - "node": ">=10" + "node": ">=8" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -8109,17 +7958,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "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/globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", @@ -8185,13 +8023,13 @@ } }, "node_modules/gql.tada": { - "version": "1.5.5", - "resolved": "https://registry.npmjs.org/gql.tada/-/gql.tada-1.5.5.tgz", - "integrity": "sha512-S9pA96CmOv25MTPqyDT/BA5yQBbCzfY64ltM/POxeR+NLftNh6hP4wIm2Hu1KCpS94I94naWbETD0c+mwiBlwA==", + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/gql.tada/-/gql.tada-1.6.3.tgz", + "integrity": "sha512-uIlVEv6z3kvnRb3hxUTu0gGOO7WxpWdm2H/tCm3SHxbznOGgw64x3gNo8ofaGgBN9OiX1KQ6IrYJmA+V8Gh7ig==", "dependencies": { "@0no-co/graphql.web": "^1.0.5", - "@gql.tada/cli-utils": "1.1.1", - "@gql.tada/internal": "0.2.1" + "@gql.tada/cli-utils": "1.3.3", + "@gql.tada/internal": "0.3.3" }, "bin": { "gql-tada": "bin/cli.js", @@ -8335,11 +8173,6 @@ "react-is": "^16.7.0" } }, - "node_modules/hoist-non-react-statics/node_modules/react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" - }, "node_modules/html-encoding-sniffer": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz", @@ -8531,14 +8364,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "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-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -8557,17 +8382,6 @@ "node": ">=6" } }, - "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-hex-prefixed": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", @@ -8581,6 +8395,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, "engines": { "node": ">=0.12.0" } @@ -8592,6 +8407,15 @@ "dev": true, "peer": true }, + "node_modules/is-reference": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-3.0.2.tgz", + "integrity": "sha512-v3rht/LgVcsdZa3O2Nqs+NMowLOxeOm7Ay9+/ARQ2F+qEoANRcqrjAZKGN0v8ymUetZGgkp26LTnGT7H0Qo9Pg==", + "peer": true, + "dependencies": { + "@types/estree": "*" + } + }, "node_modules/is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", @@ -8769,26 +8593,6 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==" }, - "node_modules/jayson/node_modules/ws": { - "version": "7.5.9", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", - "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", - "engines": { - "node": ">=8.3.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, "node_modules/jest": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", @@ -8897,33 +8701,67 @@ } } }, - "node_modules/jest-config": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", - "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", + "node_modules/jest-cli/node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dev": true, "peer": true, "dependencies": { - "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^29.7.0", - "@jest/types": "^29.6.3", - "babel-jest": "^29.7.0", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "deepmerge": "^4.2.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-circus": "^29.7.0", - "jest-environment-node": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-regex-util": "^29.6.3", - "jest-resolve": "^29.7.0", - "jest-runner": "^29.7.0", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "micromatch": "^4.0.4", - "parse-json": "^5.2.0", - "pretty-format": "^29.7.0", + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/jest-cli/node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "peer": true, + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/jest-config": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", + "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", + "dev": true, + "peer": true, + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/test-sequencer": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-jest": "^29.7.0", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-circus": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "micromatch": "^4.0.4", + "parse-json": "^5.2.0", + "pretty-format": "^29.7.0", "slash": "^3.0.0", "strip-json-comments": "^3.1.1" }, @@ -10355,28 +10193,6 @@ "node": ">=10" } }, - "node_modules/jsdom/node_modules/ws": { - "version": "7.5.9", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", - "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", - "dev": true, - "peer": true, - "engines": { - "node": ">=8.3.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, "node_modules/jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -10632,6 +10448,12 @@ "node": ">=4" } }, + "node_modules/locate-character": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-character/-/locate-character-3.0.0.tgz", + "integrity": "sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==", + "peer": true + }, "node_modules/locate-path": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", @@ -10709,6 +10531,15 @@ "yallist": "^3.0.2" } }, + "node_modules/magic-string": { + "version": "0.30.10", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.10.tgz", + "integrity": "sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==", + "peer": true, + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.15" + } + }, "node_modules/make-dir": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", @@ -10798,6 +10629,12 @@ "safe-buffer": "^5.1.2" } }, + "node_modules/mdn-data": { + "version": "2.0.30", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz", + "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==", + "peer": true + }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -10805,18 +10642,11 @@ "dev": true, "peer": true }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "engines": { - "node": ">= 8" - } - }, "node_modules/micromatch": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, "dependencies": { "braces": "^3.0.2", "picomatch": "^2.3.1" @@ -11056,9 +10886,9 @@ } }, "node_modules/nwsapi": { - "version": "2.2.7", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.7.tgz", - "integrity": "sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==", + "version": "2.2.9", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.9.tgz", + "integrity": "sha512-2f3F0SEEer8bBu0dsNCFF50N0cTThV1nWFYcEYFZttdW0lDAoybv9cQoK7X7/68Z89S7FoRrVjP1LPX4XRf9vg==", "dev": true, "peer": true }, @@ -11218,6 +11048,15 @@ "dev": true, "peer": true }, + "node_modules/pascal-case": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-3.1.2.tgz", + "integrity": "sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==", + "dependencies": { + "no-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, "node_modules/path-browserify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", @@ -11271,6 +11110,26 @@ "node": ">=0.12" } }, + "node_modules/periscopic": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/periscopic/-/periscopic-3.1.0.tgz", + "integrity": "sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw==", + "peer": true, + "dependencies": { + "@types/estree": "^1.0.0", + "estree-walker": "^3.0.0", + "is-reference": "^3.0.0" + } + }, + "node_modules/periscopic/node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "peer": true, + "dependencies": { + "@types/estree": "^1.0.0" + } + }, "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", @@ -11281,6 +11140,7 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, "engines": { "node": ">=8.6" }, @@ -11352,6 +11212,12 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/pretty-format/node_modules/react-is": { + "version": "18.3.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.0.tgz", + "integrity": "sha512-wRiUsea88TjKDc4FBEn+sLvIDesp6brMbGWnJGjew2waAc9evdhja/2LvePc898HJbHw0L+MTWy7NhpnELAvLQ==", + "dev": true + }, "node_modules/process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", @@ -11381,11 +11247,6 @@ "react-is": "^16.13.1" } }, - "node_modules/prop-types/node_modules/react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" - }, "node_modules/propagate": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/propagate/-/propagate-2.0.1.tgz", @@ -11475,25 +11336,6 @@ "dev": true, "peer": true }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "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/quick-lru": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", @@ -11514,10 +11356,9 @@ } }, "node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, "node_modules/readable-stream": { "version": "3.6.2", @@ -11563,9 +11404,9 @@ "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" }, "node_modules/rehackt": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/rehackt/-/rehackt-0.0.6.tgz", - "integrity": "sha512-l3WEzkt4ntlEc/IB3/mF6SRgNHA6zfQR7BlGOgBTOmx7IJJXojDASav+NsgXHFjHn+6RmwqsGPFgZpabWpeOdw==", + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/rehackt/-/rehackt-0.1.0.tgz", + "integrity": "sha512-7kRDOuLHB87D/JESKxQoRwv4DzbIdwkAGQ7p6QKGdVlY1IZheUnVhlk/4UZlNUVxdAXpyxikE3URsG067ybVzw==", "peerDependencies": { "@types/react": "*", "react": "*" @@ -11676,15 +11517,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, "node_modules/rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", @@ -11722,9 +11554,9 @@ } }, "node_modules/rpc-websockets": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/rpc-websockets/-/rpc-websockets-7.9.0.tgz", - "integrity": "sha512-DwKewQz1IUA5wfLvgM8wDpPRcr+nWSxuFxx5CbrI2z/MyyZ4nXLM86TvIA+cI1ZAdqC8JIBR1mZR55dzaLU+Hw==", + "version": "7.10.0", + "resolved": "https://registry.npmjs.org/rpc-websockets/-/rpc-websockets-7.10.0.tgz", + "integrity": "sha512-cemZ6RiDtYZpPiBzYijdOrkQQzmBCmug0E9SdRH2gIUNT15ql4mwCYWIp0VnSZq6Qrw/JkGUygp4PrK1y9KfwQ==", "dependencies": { "@babel/runtime": "^7.17.2", "eventemitter3": "^4.0.7", @@ -11740,26 +11572,24 @@ "utf-8-validate": "^5.0.2" } }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" + "node_modules/rpc-websockets/node_modules/ws": { + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", + "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true }, - { - "type": "consulting", - "url": "https://feross.org/support" + "utf-8-validate": { + "optional": true } - ], - "dependencies": { - "queue-microtask": "^1.2.2" } }, "node_modules/rxjs": { @@ -12156,6 +11986,53 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/svelte": { + "version": "4.2.15", + "resolved": "https://registry.npmjs.org/svelte/-/svelte-4.2.15.tgz", + "integrity": "sha512-j9KJSccHgLeRERPlhMKrCXpk2TqL2m5Z+k+OBTQhZOhIdCCd3WfqV+ylPWeipEwq17P/ekiSFWwrVQv93i3bsg==", + "peer": true, + "dependencies": { + "@ampproject/remapping": "^2.2.1", + "@jridgewell/sourcemap-codec": "^1.4.15", + "@jridgewell/trace-mapping": "^0.3.18", + "@types/estree": "^1.0.1", + "acorn": "^8.9.0", + "aria-query": "^5.3.0", + "axobject-query": "^4.0.0", + "code-red": "^1.0.3", + "css-tree": "^2.3.1", + "estree-walker": "^3.0.3", + "is-reference": "^3.0.1", + "locate-character": "^3.0.0", + "magic-string": "^0.30.4", + "periscopic": "^3.1.0" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/svelte/node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "peer": true, + "dependencies": { + "@types/estree": "^1.0.0" + } + }, + "node_modules/svelte2tsx": { + "version": "0.7.7", + "resolved": "https://registry.npmjs.org/svelte2tsx/-/svelte2tsx-0.7.7.tgz", + "integrity": "sha512-HAIxtk5TUHXvCRKApKfxoh1BGT85S/17lS3DvbfxRKFd+Ghr5YScqBvd+sU+p7vJFw48LNkzdFk+ooNVk3e4kA==", + "dependencies": { + "dedent-js": "^1.0.1", + "pascal-case": "^3.1.1" + }, + "peerDependencies": { + "svelte": "^3.55 || ^4.0.0-next.0 || ^4.0 || ^5.0.0-next.0", + "typescript": "^4.9.4 || ^5.0.0" + } + }, "node_modules/symbol-observable": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-4.0.0.tgz", @@ -12347,6 +12224,7 @@ "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==", + "dev": true, "dependencies": { "is-number": "^7.0.0" }, @@ -12375,16 +12253,6 @@ "node": ">=6" } }, - "node_modules/tough-cookie/node_modules/universalify": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", - "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", - "dev": true, - "peer": true, - "engines": { - "node": ">= 4.0.0" - } - }, "node_modules/tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", @@ -12501,15 +12369,6 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, - "node_modules/ts-morph": { - "version": "22.0.0", - "resolved": "https://registry.npmjs.org/ts-morph/-/ts-morph-22.0.0.tgz", - "integrity": "sha512-M9MqFGZREyeb5fTl6gNHKZLqBQA0TjA1lea+CR48R8EBTDuWrNqW6ccC5QvjNR4s6wDumD3LTCjOFSp9iwlzaw==", - "dependencies": { - "@ts-morph/common": "~0.23.0", - "code-block-writer": "^13.0.1" - } - }, "node_modules/ts-node": { "version": "10.9.2", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", @@ -12553,10 +12412,19 @@ } } }, + "node_modules/ts-node/node_modules/acorn-walk": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.2.tgz", + "integrity": "sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/tslint": { "version": "6.1.3", @@ -12706,9 +12574,9 @@ "dev": true }, "node_modules/tsx": { - "version": "4.7.2", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.7.2.tgz", - "integrity": "sha512-BCNd4kz6fz12fyrgCTEdZHGJ9fWTGeUzXmQysh0RVocDY3h4frk05ZNCXSy4kIenF7y/QnrdiVpTsyNRn6vlAw==", + "version": "4.7.3", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.7.3.tgz", + "integrity": "sha512-+fQnMqIp/jxZEXLcj6WzYy9FhcS5/Dfk8y4AtzJ6ejKcKqmfTF8Gso/jtrzDggCF2zTU20gJa6n8XqPYwDAUYQ==", "dev": true, "dependencies": { "esbuild": "~0.19.10", @@ -12818,9 +12686,9 @@ "dev": true }, "node_modules/typescript": { - "version": "5.4.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.3.tgz", - "integrity": "sha512-KrPd3PKaCLr78MalgiwJnA25Nm8HAmdwN3mYUYZgG/wizIo9EainNVQI9/yDavtVFRN2h3k8uf3GLHuhDMgEHg==", + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -12844,10 +12712,11 @@ "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" }, "node_modules/universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", "dev": true, + "peer": true, "engines": { "node": ">= 4.0.0" } @@ -13111,11 +12980,11 @@ } }, "node_modules/ws": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz", - "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==", + "version": "7.5.9", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", "engines": { - "node": ">=10.0.0" + "node": ">=8.3.0" }, "peerDependencies": { "bufferutil": "^4.0.1", @@ -13185,33 +13054,38 @@ "peer": true }, "node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dev": true, - "peer": true, + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", "dependencies": { - "cliui": "^8.0.1", + "cliui": "^7.0.2", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", - "string-width": "^4.2.3", + "string-width": "^4.2.0", "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" + "yargs-parser": "^20.2.2" }, "engines": { - "node": ">=12" + "node": ">=10" } }, "node_modules/yargs-parser": { "version": "21.1.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true, "engines": { "node": ">=12" } }, + "node_modules/yargs/node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "engines": { + "node": ">=10" + } + }, "node_modules/yn": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", @@ -13247,15 +13121,91 @@ "zen-observable": "0.8.15" } }, - "route": { + "sdk/definitions": { + "name": "@wormhole-foundation/sdk-definitions-ntt", + "version": "0.0.1-beta.5", + "dependencies": { + "@noble/hashes": "^1.3.1", + "@wormhole-foundation/sdk-base": "0.6.5", + "@wormhole-foundation/sdk-definitions": "0.6.5" + } + }, + "sdk/evm": { + "name": "@wormhole-foundation/sdk-evm-ntt", + "version": "0.0.1-beta.5", + "license": "Apache-2.0", + "dependencies": { + "@wormhole-foundation/sdk-connect": "0.6.5", + "@wormhole-foundation/sdk-definitions-ntt": "0.0.1-beta.5", + "@wormhole-foundation/sdk-evm": "0.6.5", + "@wormhole-foundation/sdk-evm-core": "0.6.5", + "ethers": "^6.5.1" + }, + "devDependencies": { + "@typechain/ethers-v6": "^0.5.1", + "tsx": "^4.7.2", + "typechain": "^8.3.2" + }, + "engines": { + "node": ">=16" + } + }, + "sdk/evm/node_modules/@typechain/ethers-v6": { + "version": "0.5.1", + "dev": true, + "license": "MIT", + "dependencies": { + "lodash": "^4.17.15", + "ts-essentials": "^7.0.1" + }, + "peerDependencies": { + "ethers": "6.x", + "typechain": "^8.3.2", + "typescript": ">=4.7.0" + } + }, + "sdk/examples": { + "name": "@wormhole-foundation/sdk-examples-ntt", + "version": "0.0.1-beta.5", + "license": "Apache-2.0", + "dependencies": { + "@wormhole-foundation/sdk": "0.6.5", + "@wormhole-foundation/sdk-definitions-ntt": "0.0.1-beta.5", + "@wormhole-foundation/sdk-evm-ntt": "0.0.1-beta.5", + "@wormhole-foundation/sdk-route-ntt": "0.0.1-beta.5", + "@wormhole-foundation/sdk-solana-ntt": "0.0.1-beta.5" + }, + "devDependencies": { + "dotenv": "^16.4.5", + "nock": "^13.3.3", + "ts-jest": "^29.1.2", + "ts-node": "^10.9.2", + "tsx": "^4.7.2" + }, + "engines": { + "node": ">=16" + } + }, + "sdk/examples/node_modules/dotenv": { + "version": "16.4.5", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "sdk/route": { "name": "@wormhole-foundation/sdk-route-ntt", - "version": "0.0.1-beta.1", + "version": "0.0.1-beta.5", "license": "Apache-2.0", "dependencies": { - "@wormhole-foundation/sdk-connect": "0.5.3-beta.9", - "@wormhole-foundation/sdk-definitions-ntt": "0.0.1-beta.1", - "@wormhole-foundation/sdk-evm-ntt": "0.0.1-beta.1", - "@wormhole-foundation/sdk-solana-ntt": "0.0.1-beta.1" + "@wormhole-foundation/sdk-connect": "0.6.5", + "@wormhole-foundation/sdk-definitions-ntt": "0.0.1-beta.5", + "@wormhole-foundation/sdk-evm-ntt": "0.0.1-beta.5", + "@wormhole-foundation/sdk-solana-ntt": "0.0.1-beta.5" }, "devDependencies": { "nock": "^13.3.3", @@ -13264,20 +13214,24 @@ }, "engines": { "node": ">=16" + }, + "peerDependencies": { + "@wormhole-foundation/sdk-connect": "^0.6" } }, "solana": { "name": "@wormhole-foundation/sdk-solana-ntt", - "version": "0.0.1-beta.1", + "version": "0.0.1-beta.5", "license": "Apache-2.0", "dependencies": { "@coral-xyz/anchor": "0.29.0", "@coral-xyz/borsh": "0.29.0", - "@solana/spl-token": "0.3.9", + "@solana/spl-token": "0.4.0", "@solana/web3.js": "1.91.7", - "@wormhole-foundation/sdk-definitions-ntt": "0.0.1-beta.1", - "@wormhole-foundation/sdk-solana": "0.5.3-beta.9", - "@wormhole-foundation/sdk-solana-core": "0.5.3-beta.9" + "@wormhole-foundation/sdk-connect": "0.6.5", + "@wormhole-foundation/sdk-solana": "0.6.5", + "@wormhole-foundation/sdk-solana-core": "0.6.5", + "bn.js": "5.2.1" }, "devDependencies": { "@types/bn.js": "^5.1.5", @@ -13289,6 +13243,93 @@ "engines": { "node": ">=16" } + }, + "solana/node_modules/@solana/codecs-core": { + "version": "2.0.0-experimental.8618508", + "license": "MIT" + }, + "solana/node_modules/@solana/codecs-data-structures": { + "version": "2.0.0-experimental.8618508", + "license": "MIT", + "dependencies": { + "@solana/codecs-core": "2.0.0-experimental.8618508", + "@solana/codecs-numbers": "2.0.0-experimental.8618508" + } + }, + "solana/node_modules/@solana/codecs-numbers": { + "version": "2.0.0-experimental.8618508", + "license": "MIT", + "dependencies": { + "@solana/codecs-core": "2.0.0-experimental.8618508" + } + }, + "solana/node_modules/@solana/codecs-strings": { + "version": "2.0.0-experimental.8618508", + "license": "MIT", + "dependencies": { + "@solana/codecs-core": "2.0.0-experimental.8618508", + "@solana/codecs-numbers": "2.0.0-experimental.8618508" + }, + "peerDependencies": { + "fastestsmallesttextencoderdecoder": "^1.0.22" + } + }, + "solana/node_modules/@solana/options": { + "version": "2.0.0-experimental.8618508", + "license": "MIT", + "dependencies": { + "@solana/codecs-core": "2.0.0-experimental.8618508", + "@solana/codecs-numbers": "2.0.0-experimental.8618508" + } + }, + "solana/node_modules/@solana/spl-token": { + "version": "0.4.0", + "license": "Apache-2.0", + "dependencies": { + "@solana/buffer-layout": "^4.0.0", + "@solana/buffer-layout-utils": "^0.2.0", + "@solana/spl-token-metadata": "^0.1.2", + "buffer": "^6.0.3" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "@solana/web3.js": "^1.89.1" + } + }, + "solana/node_modules/@solana/spl-token-metadata": { + "version": "0.1.2", + "license": "Apache-2.0", + "dependencies": { + "@solana/codecs-core": "2.0.0-experimental.8618508", + "@solana/codecs-data-structures": "2.0.0-experimental.8618508", + "@solana/codecs-numbers": "2.0.0-experimental.8618508", + "@solana/codecs-strings": "2.0.0-experimental.8618508", + "@solana/options": "2.0.0-experimental.8618508", + "@solana/spl-type-length-value": "0.1.0" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "@solana/web3.js": "^1.87.6" + } + }, + "solana/node_modules/@solana/spl-type-length-value": { + "version": "0.1.0", + "license": "Apache-2.0", + "dependencies": { + "buffer": "^6.0.3" + }, + "engines": { + "node": ">=16" + } + }, + "solana/node_modules/fastestsmallesttextencoderdecoder": { + "version": "1.0.22", + "license": "CC0-1.0", + "peer": true } } } diff --git a/sdk/package.json b/package.json similarity index 68% rename from sdk/package.json rename to package.json index 5bba8b693..3b93f31df 100644 --- a/sdk/package.json +++ b/package.json @@ -1,28 +1,26 @@ { - "name": "ntt-sdk", - "version": "0.0.1-beta.1", + "name": "ntt", + "version": "0.0.1-beta.5", "type": "module", "license": "Apache-2.0", "scripts": { "build": "npm run build --workspaces --if-present", "rebuild": "npm run rebuild --workspaces --if-present", - "build:solana": "npm run build --workspace=definitions --workspace=solana", - "build:evm": "npm run build --workspace=definitions --workspace=evm", + "build:solana": "npm run build --workspace=sdk/definitions --workspace=solana", + "build:evm": "npm run build --workspace=sdk/definitions --workspace=sdk/evm", "generate": "npm run generate --workspaces --if-present", "test": "npm run test --workspaces --if-present", "test:ci": "CI=true jest --config ./jest.config.ts", "test:local": "jest --config ./jest.config.ts", "generate:test": "npm run generate:test --workspaces --if-present", "build:deps": "npm run build:contracts --workspaces --if-present && npm run generate", - "publish": "npm publish --access public --tag $TAG --workspaces", + "publish": "npm publish --access public --tag $TAG --workspace sdk/definitions --workspace sdk/evm --workspace solana --workspace sdk/route", "pub:beta": "TAG=beta npm run publish", "pub:latest": "TAG=latest npm run publish", - "sync": "tsx syncVersion.ts && npm install && npm run build" - }, - "dependencies": { - "@wormhole-foundation/sdk": "0.5.3-beta.9" + "sync": "tsx sdk/syncVersion.ts && npm install && npm run build" }, "devDependencies": { + "@wormhole-foundation/sdk": "0.6.5", "@solana/spl-token": "0.3.9", "@solana/web3.js": "1.91.7", "@types/jest": "^29.5.12", @@ -34,10 +32,11 @@ "typescript": "^5.1.1" }, "workspaces": [ - "definitions", + "sdk/definitions", + "sdk/evm", "solana", - "evm", - "route", - "examples" + "sdk/route", + "sdk/examples", + "cli" ] } diff --git a/sdk/Dockerfile b/sdk/Dockerfile index 16552faee..3cd598347 100644 --- a/sdk/Dockerfile +++ b/sdk/Dockerfile @@ -1,14 +1,20 @@ FROM node:20.11.1-alpine@sha256:f4c96a28c0b2d8981664e03f461c2677152cd9a756012ffa8e2c6727427c2bda -WORKDIR /usr/src/sdk/ +WORKDIR /usr/src/ + +COPY --from=ntt-solana-contract /usr/src/solana/ts solana/ts +COPY --from=ntt-solana-contract /usr/src/solana/package.json solana/package.json +COPY --from=ntt-solana-contract /usr/src/solana/tsconfig.esm.json solana/tsconfig.esm.json +COPY --from=ntt-solana-contract /usr/src/solana/tsconfig.cjs.json solana/tsconfig.cjs.json +COPY --from=ntt-solana-contract /usr/src/solana/target/idl solana/target/idl +COPY --from=ntt-solana-contract /usr/src/solana/target/types solana/target/types +COPY --from=ntt-evm-contract . evm/out COPY . ./ RUN --mount=type=cache,uid=1000,gid=1000,target=/home/node/.npm \ npm ci -COPY --from=ntt-evm-contract . ../evm/out -COPY --from=ntt-solana-contract /usr/src/solana/target/idl ../solana/target/idl -COPY --from=ntt-solana-contract /usr/src/solana/target/types ../solana/target/types - RUN npm run build -RUN npm run generate:test \ No newline at end of file +RUN npm run generate:test + +WORKDIR /usr/src/sdk diff --git a/sdk/VERSION b/sdk/VERSION index 7390193c4..46f560276 100644 --- a/sdk/VERSION +++ b/sdk/VERSION @@ -1 +1 @@ -0.0.1-beta.1 +0.0.1-beta.5 diff --git a/sdk/__tests__/accountant.ts b/sdk/__tests__/accountant.ts index 27e84336c..244faef45 100644 --- a/sdk/__tests__/accountant.ts +++ b/sdk/__tests__/accountant.ts @@ -13,13 +13,17 @@ export const ZERO_FEE = { let client: Awaited>; let signer: string; +const privateKey = + "quality vacuum heart guard buzz spike sight swarm shove special gym robust assume sudden deposit grid alcohol choice devote leader tilt noodle tide penalty"; +const url = process.env["CI"] + ? "http://wormchain:26657" + : "http://localhost:26659"; + export async function submitAccountantVAA(vaa: Uint8Array) { if (!signer) { // NttAccountantTest = wormhole18s5lynnmx37hq4wlrw9gdn68sg2uxp5rwf5k3u - const wallet = await getWallet( - "quality vacuum heart guard buzz spike sight swarm shove special gym robust assume sudden deposit grid alcohol choice devote leader tilt noodle tide penalty" - ); - client = await getWormchainSigningClient("http://wormchain:26657", wallet); + const wallet = await getWallet(privateKey); + client = await getWormchainSigningClient(url, wallet); const signers = await wallet.getAccounts(); signer = signers[0]!.address; } diff --git a/sdk/__tests__/index.test.ts b/sdk/__tests__/index.test.ts index 3d6ec745d..7d4806d41 100644 --- a/sdk/__tests__/index.test.ts +++ b/sdk/__tests__/index.test.ts @@ -56,12 +56,11 @@ describe("Hub and Spoke Tests", function () { deploy({ context: spokeChainB, mode: "burning" }), ]); - console.log( - "Deployed: ", - { chain: hub.context.chain, ...hub.contracts }, - { chain: spokeA.context.chain, ...spokeA.contracts }, - { chain: spokeB.context.chain, ...spokeB.contracts } - ); + console.log("Deployed: ", { + [hub.context.chain]: hub.contracts, + [spokeA.context.chain]: spokeA.contracts, + [spokeB.context.chain]: spokeB.contracts, + }); // Link contracts console.log("Linking Peers"); diff --git a/sdk/__tests__/utils.ts b/sdk/__tests__/utils.ts index 225df1645..c8d3ad1c6 100644 --- a/sdk/__tests__/utils.ts +++ b/sdk/__tests__/utils.ts @@ -36,8 +36,8 @@ import solanaTiltKey from "./solana-tilt.json"; // from https://github.com/wormh import { Ntt } from "../definitions/src/index.js"; import "../evm/src/index.js"; -import "../solana/src/index.js"; -import { SolanaNtt } from "../solana/src/index.js"; +import "../../solana/ts/sdk/index.js"; +import { SolanaNtt } from "../../solana/ts/sdk/index.js"; import { submitAccountantVAA } from "./accountant.js"; // Note: Currently, in order for this to run, the evm bindings with extra contracts must be build @@ -494,7 +494,8 @@ async function deployEvm(ctx: Ctx): Promise { async function deploySolana(ctx: Ctx): Promise { const { signer, nativeSigner: keypair } = ctx.signers as Signers<"Solana">; const connection = (await ctx.context.getRpc()) as Connection; - const address = new PublicKey(signer.address()); + const sender = Wormhole.chainAddress("Solana", signer.address()); + const address = sender.address.toNative("Solana").unwrap(); console.log(`Using public key: ${address}`); const mint = await spl.createMint(connection, keypair, address, null, 9); @@ -547,10 +548,7 @@ async function deploySolana(ctx: Ctx): Promise { manager.pdas.tokenAuthority().toString() ); - const initTxs = manager.initialize({ - payer: keypair, - owner: keypair, - chain: "Solana", + const initTxs = manager.initialize(sender.address, { mint, outboundLimit: 1000000000n, mode: ctx.mode, diff --git a/sdk/definitions/package.json b/sdk/definitions/package.json index 1e1c3ed04..1f110554a 100644 --- a/sdk/definitions/package.json +++ b/sdk/definitions/package.json @@ -1,6 +1,6 @@ { "name": "@wormhole-foundation/sdk-definitions-ntt", - "version": "0.0.1-beta.1", + "version": "0.0.1-beta.5", "repository": { "type": "git", "url": "git+https://github.com/wormhole-foundation/connect-sdk.git" @@ -19,6 +19,7 @@ "dist/esm", "dist/cjs" ], + "sideEffects": true, "exports": { ".": { "require": { @@ -49,8 +50,8 @@ }, "dependencies": { "@noble/hashes": "^1.3.1", - "@wormhole-foundation/sdk-base": "0.5.3-beta.9", - "@wormhole-foundation/sdk-definitions": "0.5.3-beta.9" + "@wormhole-foundation/sdk-base": "0.6.5", + "@wormhole-foundation/sdk-definitions": "0.6.5" }, "type": "module" } \ No newline at end of file diff --git a/sdk/definitions/src/ntt.ts b/sdk/definitions/src/ntt.ts index a3184e74b..d5b7b7614 100644 --- a/sdk/definitions/src/ntt.ts +++ b/sdk/definitions/src/ntt.ts @@ -176,9 +176,6 @@ export interface Ntt { payer?: AccountAddress ): AsyncGenerator>; - /** Get the interface version */ - getVersion(payer?: AccountAddress): Promise; - /** Get the address for the account that custodies locked tokens */ getCustodyAddress(): Promise; diff --git a/sdk/evm/package.json b/sdk/evm/package.json index 906c4cd6d..dbeeb8492 100644 --- a/sdk/evm/package.json +++ b/sdk/evm/package.json @@ -1,6 +1,6 @@ { "name": "@wormhole-foundation/sdk-evm-ntt", - "version": "0.0.1-beta.1", + "version": "0.0.1-beta.5", "repository": { "type": "git", "url": "git+https://github.com/wormhole-foundation/connect-sdk.git" @@ -45,10 +45,10 @@ "test": "jest --config ./jest.config.ts" }, "dependencies": { - "@wormhole-foundation/sdk-connect": "0.5.3-beta.9", - "@wormhole-foundation/sdk-definitions-ntt": "0.0.1-beta.1", - "@wormhole-foundation/sdk-evm": "0.5.3-beta.9", - "@wormhole-foundation/sdk-evm-core": "0.5.3-beta.9", + "@wormhole-foundation/sdk-connect": "0.6.5", + "@wormhole-foundation/sdk-definitions-ntt": "0.0.1-beta.5", + "@wormhole-foundation/sdk-evm": "0.6.5", + "@wormhole-foundation/sdk-evm-core": "0.6.5", "ethers": "^6.5.1" }, "devDependencies": { @@ -69,4 +69,4 @@ } } } -} +} \ No newline at end of file diff --git a/sdk/evm/src/bindings.ts b/sdk/evm/src/bindings.ts index 04c439c44..6a432fae1 100644 --- a/sdk/evm/src/bindings.ts +++ b/sdk/evm/src/bindings.ts @@ -1,11 +1,12 @@ import { Provider } from "ethers"; -import { _0_1_0, _1_0_0 } from "./ethers-contracts/index.js"; +import { _0_1_0, _1_0_0, _1_1_0 } from "./ethers-contracts/index.js"; export const AbiVersions = { "0.1.0": _0_1_0, "1.0.0": _1_0_0, - default: _1_0_0, + "1.1.0": _1_1_0, + default: _1_1_0, } as const; export type AbiVersion = keyof typeof AbiVersions; diff --git a/sdk/evm/src/ethers-contracts/1_1_0/NttManager.ts b/sdk/evm/src/ethers-contracts/1_1_0/NttManager.ts new file mode 100644 index 000000000..ccc2aff1b --- /dev/null +++ b/sdk/evm/src/ethers-contracts/1_1_0/NttManager.ts @@ -0,0 +1,1699 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumberish, + BytesLike, + FunctionFragment, + Result, + Interface, + EventFragment, + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; +import type { + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, + TypedListener, + TypedContractMethod, +} from "./common.js"; + +export declare namespace TransceiverStructs { + export type NttManagerMessageStruct = { + id: BytesLike; + sender: BytesLike; + payload: BytesLike; + }; + + export type NttManagerMessageStructOutput = [ + id: string, + sender: string, + payload: string + ] & { id: string; sender: string; payload: string }; +} + +export declare namespace IRateLimiter { + export type RateLimitParamsStruct = { + limit: BigNumberish; + currentCapacity: BigNumberish; + lastTxTimestamp: BigNumberish; + }; + + export type RateLimitParamsStructOutput = [ + limit: bigint, + currentCapacity: bigint, + lastTxTimestamp: bigint + ] & { limit: bigint; currentCapacity: bigint; lastTxTimestamp: bigint }; + + export type InboundQueuedTransferStruct = { + amount: BigNumberish; + txTimestamp: BigNumberish; + recipient: AddressLike; + }; + + export type InboundQueuedTransferStructOutput = [ + amount: bigint, + txTimestamp: bigint, + recipient: string + ] & { amount: bigint; txTimestamp: bigint; recipient: string }; + + export type OutboundQueuedTransferStruct = { + recipient: BytesLike; + refundAddress: BytesLike; + amount: BigNumberish; + txTimestamp: BigNumberish; + recipientChain: BigNumberish; + sender: AddressLike; + transceiverInstructions: BytesLike; + }; + + export type OutboundQueuedTransferStructOutput = [ + recipient: string, + refundAddress: string, + amount: bigint, + txTimestamp: bigint, + recipientChain: bigint, + sender: string, + transceiverInstructions: string + ] & { + recipient: string; + refundAddress: string; + amount: bigint; + txTimestamp: bigint; + recipientChain: bigint; + sender: string; + transceiverInstructions: string; + }; +} + +export declare namespace INttManager { + export type NttManagerPeerStruct = { + peerAddress: BytesLike; + tokenDecimals: BigNumberish; + }; + + export type NttManagerPeerStructOutput = [ + peerAddress: string, + tokenDecimals: bigint + ] & { peerAddress: string; tokenDecimals: bigint }; +} + +export declare namespace TransceiverRegistry { + export type TransceiverInfoStruct = { + registered: boolean; + enabled: boolean; + index: BigNumberish; + }; + + export type TransceiverInfoStructOutput = [ + registered: boolean, + enabled: boolean, + index: bigint + ] & { registered: boolean; enabled: boolean; index: bigint }; +} + +export interface NttManagerInterface extends Interface { + getFunction( + nameOrSignature: + | "NTT_MANAGER_VERSION" + | "attestationReceived" + | "cancelOutboundQueuedTransfer" + | "chainId" + | "completeInboundQueuedTransfer" + | "completeOutboundQueuedTransfer" + | "executeMsg" + | "getCurrentInboundCapacity" + | "getCurrentOutboundCapacity" + | "getInboundLimitParams" + | "getInboundQueuedTransfer" + | "getMigratesImmutables" + | "getMode" + | "getOutboundLimitParams" + | "getOutboundQueuedTransfer" + | "getPeer" + | "getThreshold" + | "getTransceiverInfo" + | "getTransceivers" + | "initialize" + | "isMessageApproved" + | "isMessageExecuted" + | "isPaused" + | "messageAttestations" + | "migrate" + | "mode" + | "nextMessageSequence" + | "owner" + | "pause" + | "pauser" + | "quoteDeliveryPrice" + | "rateLimitDuration" + | "removeTransceiver" + | "setInboundLimit" + | "setOutboundLimit" + | "setPeer" + | "setThreshold" + | "setTransceiver" + | "token" + | "tokenDecimals" + | "transceiverAttestedToMessage" + | "transfer(uint256,uint16,bytes32)" + | "transfer(uint256,uint16,bytes32,bytes32,bool,bytes)" + | "transferOwnership" + | "transferPauserCapability" + | "unpause" + | "upgrade" + ): FunctionFragment; + + getEvent( + nameOrSignatureOrTopic: + | "AdminChanged" + | "BeaconUpgraded" + | "InboundTransferQueued" + | "Initialized" + | "MessageAlreadyExecuted" + | "MessageAttestedTo" + | "NotPaused" + | "OutboundTransferCancelled" + | "OutboundTransferQueued" + | "OutboundTransferRateLimited" + | "OwnershipTransferred" + | "Paused" + | "PauserTransferred" + | "PeerUpdated" + | "ThresholdChanged" + | "TransceiverAdded" + | "TransceiverRemoved" + | "TransferRedeemed" + | "TransferSent" + | "Upgraded" + ): EventFragment; + + encodeFunctionData( + functionFragment: "NTT_MANAGER_VERSION", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "attestationReceived", + values: [ + BigNumberish, + BytesLike, + TransceiverStructs.NttManagerMessageStruct + ] + ): string; + encodeFunctionData( + functionFragment: "cancelOutboundQueuedTransfer", + values: [BigNumberish] + ): string; + encodeFunctionData(functionFragment: "chainId", values?: undefined): string; + encodeFunctionData( + functionFragment: "completeInboundQueuedTransfer", + values: [BytesLike] + ): string; + encodeFunctionData( + functionFragment: "completeOutboundQueuedTransfer", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "executeMsg", + values: [ + BigNumberish, + BytesLike, + TransceiverStructs.NttManagerMessageStruct + ] + ): string; + encodeFunctionData( + functionFragment: "getCurrentInboundCapacity", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getCurrentOutboundCapacity", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getInboundLimitParams", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getInboundQueuedTransfer", + values: [BytesLike] + ): string; + encodeFunctionData( + functionFragment: "getMigratesImmutables", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "getMode", values?: undefined): string; + encodeFunctionData( + functionFragment: "getOutboundLimitParams", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getOutboundQueuedTransfer", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getPeer", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getThreshold", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getTransceiverInfo", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getTransceivers", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "initialize", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "isMessageApproved", + values: [BytesLike] + ): string; + encodeFunctionData( + functionFragment: "isMessageExecuted", + values: [BytesLike] + ): string; + encodeFunctionData(functionFragment: "isPaused", values?: undefined): string; + encodeFunctionData( + functionFragment: "messageAttestations", + values: [BytesLike] + ): string; + encodeFunctionData(functionFragment: "migrate", values?: undefined): string; + encodeFunctionData(functionFragment: "mode", values?: undefined): string; + encodeFunctionData( + functionFragment: "nextMessageSequence", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "owner", values?: undefined): string; + encodeFunctionData(functionFragment: "pause", values?: undefined): string; + encodeFunctionData(functionFragment: "pauser", values?: undefined): string; + encodeFunctionData( + functionFragment: "quoteDeliveryPrice", + values: [BigNumberish, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "rateLimitDuration", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "removeTransceiver", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "setInboundLimit", + values: [BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "setOutboundLimit", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "setPeer", + values: [BigNumberish, BytesLike, BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "setThreshold", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "setTransceiver", + values: [AddressLike] + ): string; + encodeFunctionData(functionFragment: "token", values?: undefined): string; + encodeFunctionData( + functionFragment: "tokenDecimals", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transceiverAttestedToMessage", + values: [BytesLike, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "transfer(uint256,uint16,bytes32)", + values: [BigNumberish, BigNumberish, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "transfer(uint256,uint16,bytes32,bytes32,bool,bytes)", + values: [ + BigNumberish, + BigNumberish, + BytesLike, + BytesLike, + boolean, + BytesLike + ] + ): string; + encodeFunctionData( + functionFragment: "transferOwnership", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "transferPauserCapability", + values: [AddressLike] + ): string; + encodeFunctionData(functionFragment: "unpause", values?: undefined): string; + encodeFunctionData( + functionFragment: "upgrade", + values: [AddressLike] + ): string; + + decodeFunctionResult( + functionFragment: "NTT_MANAGER_VERSION", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "attestationReceived", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "cancelOutboundQueuedTransfer", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "chainId", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "completeInboundQueuedTransfer", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "completeOutboundQueuedTransfer", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "executeMsg", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getCurrentInboundCapacity", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getCurrentOutboundCapacity", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getInboundLimitParams", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getInboundQueuedTransfer", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getMigratesImmutables", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "getMode", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getOutboundLimitParams", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getOutboundQueuedTransfer", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "getPeer", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getThreshold", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getTransceiverInfo", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getTransceivers", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "isMessageApproved", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isMessageExecuted", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "isPaused", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "messageAttestations", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "migrate", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "mode", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "nextMessageSequence", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "pause", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "pauser", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "quoteDeliveryPrice", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "rateLimitDuration", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "removeTransceiver", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setInboundLimit", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setOutboundLimit", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "setPeer", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "setThreshold", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setTransceiver", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "token", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "tokenDecimals", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "transceiverAttestedToMessage", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "transfer(uint256,uint16,bytes32)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "transfer(uint256,uint16,bytes32,bytes32,bool,bytes)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "transferOwnership", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "transferPauserCapability", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "unpause", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "upgrade", data: BytesLike): Result; +} + +export namespace AdminChangedEvent { + export type InputTuple = [previousAdmin: AddressLike, newAdmin: AddressLike]; + export type OutputTuple = [previousAdmin: string, newAdmin: string]; + export interface OutputObject { + previousAdmin: string; + newAdmin: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace BeaconUpgradedEvent { + export type InputTuple = [beacon: AddressLike]; + export type OutputTuple = [beacon: string]; + export interface OutputObject { + beacon: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace InboundTransferQueuedEvent { + export type InputTuple = [digest: BytesLike]; + export type OutputTuple = [digest: string]; + export interface OutputObject { + digest: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace InitializedEvent { + export type InputTuple = [version: BigNumberish]; + export type OutputTuple = [version: bigint]; + export interface OutputObject { + version: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace MessageAlreadyExecutedEvent { + export type InputTuple = [sourceNttManager: BytesLike, msgHash: BytesLike]; + export type OutputTuple = [sourceNttManager: string, msgHash: string]; + export interface OutputObject { + sourceNttManager: string; + msgHash: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace MessageAttestedToEvent { + export type InputTuple = [ + digest: BytesLike, + transceiver: AddressLike, + index: BigNumberish + ]; + export type OutputTuple = [ + digest: string, + transceiver: string, + index: bigint + ]; + export interface OutputObject { + digest: string; + transceiver: string; + index: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace NotPausedEvent { + export type InputTuple = [notPaused: boolean]; + export type OutputTuple = [notPaused: boolean]; + export interface OutputObject { + notPaused: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace OutboundTransferCancelledEvent { + export type InputTuple = [ + sequence: BigNumberish, + recipient: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [ + sequence: bigint, + recipient: string, + amount: bigint + ]; + export interface OutputObject { + sequence: bigint; + recipient: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace OutboundTransferQueuedEvent { + export type InputTuple = [queueSequence: BigNumberish]; + export type OutputTuple = [queueSequence: bigint]; + export interface OutputObject { + queueSequence: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace OutboundTransferRateLimitedEvent { + export type InputTuple = [ + sender: AddressLike, + sequence: BigNumberish, + amount: BigNumberish, + currentCapacity: BigNumberish + ]; + export type OutputTuple = [ + sender: string, + sequence: bigint, + amount: bigint, + currentCapacity: bigint + ]; + export interface OutputObject { + sender: string; + sequence: bigint; + amount: bigint; + currentCapacity: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace OwnershipTransferredEvent { + export type InputTuple = [previousOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [previousOwner: string, newOwner: string]; + export interface OutputObject { + previousOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace PausedEvent { + export type InputTuple = [paused: boolean]; + export type OutputTuple = [paused: boolean]; + export interface OutputObject { + paused: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace PauserTransferredEvent { + export type InputTuple = [oldPauser: AddressLike, newPauser: AddressLike]; + export type OutputTuple = [oldPauser: string, newPauser: string]; + export interface OutputObject { + oldPauser: string; + newPauser: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace PeerUpdatedEvent { + export type InputTuple = [ + chainId_: BigNumberish, + oldPeerContract: BytesLike, + oldPeerDecimals: BigNumberish, + peerContract: BytesLike, + peerDecimals: BigNumberish + ]; + export type OutputTuple = [ + chainId_: bigint, + oldPeerContract: string, + oldPeerDecimals: bigint, + peerContract: string, + peerDecimals: bigint + ]; + export interface OutputObject { + chainId_: bigint; + oldPeerContract: string; + oldPeerDecimals: bigint; + peerContract: string; + peerDecimals: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace ThresholdChangedEvent { + export type InputTuple = [ + oldThreshold: BigNumberish, + threshold: BigNumberish + ]; + export type OutputTuple = [oldThreshold: bigint, threshold: bigint]; + export interface OutputObject { + oldThreshold: bigint; + threshold: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace TransceiverAddedEvent { + export type InputTuple = [ + transceiver: AddressLike, + transceiversNum: BigNumberish, + threshold: BigNumberish + ]; + export type OutputTuple = [ + transceiver: string, + transceiversNum: bigint, + threshold: bigint + ]; + export interface OutputObject { + transceiver: string; + transceiversNum: bigint; + threshold: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace TransceiverRemovedEvent { + export type InputTuple = [transceiver: AddressLike, threshold: BigNumberish]; + export type OutputTuple = [transceiver: string, threshold: bigint]; + export interface OutputObject { + transceiver: string; + threshold: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace TransferRedeemedEvent { + export type InputTuple = [digest: BytesLike]; + export type OutputTuple = [digest: string]; + export interface OutputObject { + digest: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace TransferSentEvent { + export type InputTuple = [ + recipient: BytesLike, + refundAddress: BytesLike, + amount: BigNumberish, + fee: BigNumberish, + recipientChain: BigNumberish, + msgSequence: BigNumberish + ]; + export type OutputTuple = [ + recipient: string, + refundAddress: string, + amount: bigint, + fee: bigint, + recipientChain: bigint, + msgSequence: bigint + ]; + export interface OutputObject { + recipient: string; + refundAddress: string; + amount: bigint; + fee: bigint; + recipientChain: bigint; + msgSequence: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace UpgradedEvent { + export type InputTuple = [implementation: AddressLike]; + export type OutputTuple = [implementation: string]; + export interface OutputObject { + implementation: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export interface NttManager extends BaseContract { + connect(runner?: ContractRunner | null): NttManager; + waitForDeployment(): Promise; + + interface: NttManagerInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + NTT_MANAGER_VERSION: TypedContractMethod<[], [string], "view">; + + attestationReceived: TypedContractMethod< + [ + sourceChainId: BigNumberish, + sourceNttManagerAddress: BytesLike, + payload: TransceiverStructs.NttManagerMessageStruct + ], + [void], + "nonpayable" + >; + + cancelOutboundQueuedTransfer: TypedContractMethod< + [messageSequence: BigNumberish], + [void], + "nonpayable" + >; + + chainId: TypedContractMethod<[], [bigint], "view">; + + completeInboundQueuedTransfer: TypedContractMethod< + [digest: BytesLike], + [void], + "nonpayable" + >; + + completeOutboundQueuedTransfer: TypedContractMethod< + [messageSequence: BigNumberish], + [bigint], + "payable" + >; + + executeMsg: TypedContractMethod< + [ + sourceChainId: BigNumberish, + sourceNttManagerAddress: BytesLike, + message: TransceiverStructs.NttManagerMessageStruct + ], + [void], + "nonpayable" + >; + + getCurrentInboundCapacity: TypedContractMethod< + [chainId_: BigNumberish], + [bigint], + "view" + >; + + getCurrentOutboundCapacity: TypedContractMethod<[], [bigint], "view">; + + getInboundLimitParams: TypedContractMethod< + [chainId_: BigNumberish], + [IRateLimiter.RateLimitParamsStructOutput], + "view" + >; + + getInboundQueuedTransfer: TypedContractMethod< + [digest: BytesLike], + [IRateLimiter.InboundQueuedTransferStructOutput], + "view" + >; + + getMigratesImmutables: TypedContractMethod<[], [boolean], "view">; + + getMode: TypedContractMethod<[], [bigint], "view">; + + getOutboundLimitParams: TypedContractMethod< + [], + [IRateLimiter.RateLimitParamsStructOutput], + "view" + >; + + getOutboundQueuedTransfer: TypedContractMethod< + [queueSequence: BigNumberish], + [IRateLimiter.OutboundQueuedTransferStructOutput], + "view" + >; + + getPeer: TypedContractMethod< + [chainId_: BigNumberish], + [INttManager.NttManagerPeerStructOutput], + "view" + >; + + getThreshold: TypedContractMethod<[], [bigint], "view">; + + getTransceiverInfo: TypedContractMethod< + [], + [TransceiverRegistry.TransceiverInfoStructOutput[]], + "view" + >; + + getTransceivers: TypedContractMethod<[], [string[]], "view">; + + initialize: TypedContractMethod<[], [void], "payable">; + + isMessageApproved: TypedContractMethod< + [digest: BytesLike], + [boolean], + "view" + >; + + isMessageExecuted: TypedContractMethod< + [digest: BytesLike], + [boolean], + "view" + >; + + isPaused: TypedContractMethod<[], [boolean], "view">; + + messageAttestations: TypedContractMethod< + [digest: BytesLike], + [bigint], + "view" + >; + + migrate: TypedContractMethod<[], [void], "nonpayable">; + + mode: TypedContractMethod<[], [bigint], "view">; + + nextMessageSequence: TypedContractMethod<[], [bigint], "view">; + + owner: TypedContractMethod<[], [string], "view">; + + pause: TypedContractMethod<[], [void], "nonpayable">; + + pauser: TypedContractMethod<[], [string], "view">; + + quoteDeliveryPrice: TypedContractMethod< + [recipientChain: BigNumberish, transceiverInstructions: BytesLike], + [[bigint[], bigint]], + "view" + >; + + rateLimitDuration: TypedContractMethod<[], [bigint], "view">; + + removeTransceiver: TypedContractMethod< + [transceiver: AddressLike], + [void], + "nonpayable" + >; + + setInboundLimit: TypedContractMethod< + [limit: BigNumberish, chainId_: BigNumberish], + [void], + "nonpayable" + >; + + setOutboundLimit: TypedContractMethod< + [limit: BigNumberish], + [void], + "nonpayable" + >; + + setPeer: TypedContractMethod< + [ + peerChainId: BigNumberish, + peerContract: BytesLike, + decimals: BigNumberish, + inboundLimit: BigNumberish + ], + [void], + "nonpayable" + >; + + setThreshold: TypedContractMethod< + [threshold: BigNumberish], + [void], + "nonpayable" + >; + + setTransceiver: TypedContractMethod< + [transceiver: AddressLike], + [void], + "nonpayable" + >; + + token: TypedContractMethod<[], [string], "view">; + + tokenDecimals: TypedContractMethod<[], [bigint], "view">; + + transceiverAttestedToMessage: TypedContractMethod< + [digest: BytesLike, index: BigNumberish], + [boolean], + "view" + >; + + "transfer(uint256,uint16,bytes32)": TypedContractMethod< + [amount: BigNumberish, recipientChain: BigNumberish, recipient: BytesLike], + [bigint], + "payable" + >; + + "transfer(uint256,uint16,bytes32,bytes32,bool,bytes)": TypedContractMethod< + [ + amount: BigNumberish, + recipientChain: BigNumberish, + recipient: BytesLike, + refundAddress: BytesLike, + shouldQueue: boolean, + transceiverInstructions: BytesLike + ], + [bigint], + "payable" + >; + + transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; + + transferPauserCapability: TypedContractMethod< + [newPauser: AddressLike], + [void], + "nonpayable" + >; + + unpause: TypedContractMethod<[], [void], "nonpayable">; + + upgrade: TypedContractMethod< + [newImplementation: AddressLike], + [void], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "NTT_MANAGER_VERSION" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "attestationReceived" + ): TypedContractMethod< + [ + sourceChainId: BigNumberish, + sourceNttManagerAddress: BytesLike, + payload: TransceiverStructs.NttManagerMessageStruct + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "cancelOutboundQueuedTransfer" + ): TypedContractMethod<[messageSequence: BigNumberish], [void], "nonpayable">; + getFunction( + nameOrSignature: "chainId" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "completeInboundQueuedTransfer" + ): TypedContractMethod<[digest: BytesLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "completeOutboundQueuedTransfer" + ): TypedContractMethod<[messageSequence: BigNumberish], [bigint], "payable">; + getFunction( + nameOrSignature: "executeMsg" + ): TypedContractMethod< + [ + sourceChainId: BigNumberish, + sourceNttManagerAddress: BytesLike, + message: TransceiverStructs.NttManagerMessageStruct + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "getCurrentInboundCapacity" + ): TypedContractMethod<[chainId_: BigNumberish], [bigint], "view">; + getFunction( + nameOrSignature: "getCurrentOutboundCapacity" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "getInboundLimitParams" + ): TypedContractMethod< + [chainId_: BigNumberish], + [IRateLimiter.RateLimitParamsStructOutput], + "view" + >; + getFunction( + nameOrSignature: "getInboundQueuedTransfer" + ): TypedContractMethod< + [digest: BytesLike], + [IRateLimiter.InboundQueuedTransferStructOutput], + "view" + >; + getFunction( + nameOrSignature: "getMigratesImmutables" + ): TypedContractMethod<[], [boolean], "view">; + getFunction( + nameOrSignature: "getMode" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "getOutboundLimitParams" + ): TypedContractMethod< + [], + [IRateLimiter.RateLimitParamsStructOutput], + "view" + >; + getFunction( + nameOrSignature: "getOutboundQueuedTransfer" + ): TypedContractMethod< + [queueSequence: BigNumberish], + [IRateLimiter.OutboundQueuedTransferStructOutput], + "view" + >; + getFunction( + nameOrSignature: "getPeer" + ): TypedContractMethod< + [chainId_: BigNumberish], + [INttManager.NttManagerPeerStructOutput], + "view" + >; + getFunction( + nameOrSignature: "getThreshold" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "getTransceiverInfo" + ): TypedContractMethod< + [], + [TransceiverRegistry.TransceiverInfoStructOutput[]], + "view" + >; + getFunction( + nameOrSignature: "getTransceivers" + ): TypedContractMethod<[], [string[]], "view">; + getFunction( + nameOrSignature: "initialize" + ): TypedContractMethod<[], [void], "payable">; + getFunction( + nameOrSignature: "isMessageApproved" + ): TypedContractMethod<[digest: BytesLike], [boolean], "view">; + getFunction( + nameOrSignature: "isMessageExecuted" + ): TypedContractMethod<[digest: BytesLike], [boolean], "view">; + getFunction( + nameOrSignature: "isPaused" + ): TypedContractMethod<[], [boolean], "view">; + getFunction( + nameOrSignature: "messageAttestations" + ): TypedContractMethod<[digest: BytesLike], [bigint], "view">; + getFunction( + nameOrSignature: "migrate" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "mode" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "nextMessageSequence" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "pause" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "pauser" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "quoteDeliveryPrice" + ): TypedContractMethod< + [recipientChain: BigNumberish, transceiverInstructions: BytesLike], + [[bigint[], bigint]], + "view" + >; + getFunction( + nameOrSignature: "rateLimitDuration" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "removeTransceiver" + ): TypedContractMethod<[transceiver: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "setInboundLimit" + ): TypedContractMethod< + [limit: BigNumberish, chainId_: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setOutboundLimit" + ): TypedContractMethod<[limit: BigNumberish], [void], "nonpayable">; + getFunction( + nameOrSignature: "setPeer" + ): TypedContractMethod< + [ + peerChainId: BigNumberish, + peerContract: BytesLike, + decimals: BigNumberish, + inboundLimit: BigNumberish + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setThreshold" + ): TypedContractMethod<[threshold: BigNumberish], [void], "nonpayable">; + getFunction( + nameOrSignature: "setTransceiver" + ): TypedContractMethod<[transceiver: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "token" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "tokenDecimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transceiverAttestedToMessage" + ): TypedContractMethod< + [digest: BytesLike, index: BigNumberish], + [boolean], + "view" + >; + getFunction( + nameOrSignature: "transfer(uint256,uint16,bytes32)" + ): TypedContractMethod< + [amount: BigNumberish, recipientChain: BigNumberish, recipient: BytesLike], + [bigint], + "payable" + >; + getFunction( + nameOrSignature: "transfer(uint256,uint16,bytes32,bytes32,bool,bytes)" + ): TypedContractMethod< + [ + amount: BigNumberish, + recipientChain: BigNumberish, + recipient: BytesLike, + refundAddress: BytesLike, + shouldQueue: boolean, + transceiverInstructions: BytesLike + ], + [bigint], + "payable" + >; + getFunction( + nameOrSignature: "transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "transferPauserCapability" + ): TypedContractMethod<[newPauser: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "unpause" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "upgrade" + ): TypedContractMethod< + [newImplementation: AddressLike], + [void], + "nonpayable" + >; + + getEvent( + key: "AdminChanged" + ): TypedContractEvent< + AdminChangedEvent.InputTuple, + AdminChangedEvent.OutputTuple, + AdminChangedEvent.OutputObject + >; + getEvent( + key: "BeaconUpgraded" + ): TypedContractEvent< + BeaconUpgradedEvent.InputTuple, + BeaconUpgradedEvent.OutputTuple, + BeaconUpgradedEvent.OutputObject + >; + getEvent( + key: "InboundTransferQueued" + ): TypedContractEvent< + InboundTransferQueuedEvent.InputTuple, + InboundTransferQueuedEvent.OutputTuple, + InboundTransferQueuedEvent.OutputObject + >; + getEvent( + key: "Initialized" + ): TypedContractEvent< + InitializedEvent.InputTuple, + InitializedEvent.OutputTuple, + InitializedEvent.OutputObject + >; + getEvent( + key: "MessageAlreadyExecuted" + ): TypedContractEvent< + MessageAlreadyExecutedEvent.InputTuple, + MessageAlreadyExecutedEvent.OutputTuple, + MessageAlreadyExecutedEvent.OutputObject + >; + getEvent( + key: "MessageAttestedTo" + ): TypedContractEvent< + MessageAttestedToEvent.InputTuple, + MessageAttestedToEvent.OutputTuple, + MessageAttestedToEvent.OutputObject + >; + getEvent( + key: "NotPaused" + ): TypedContractEvent< + NotPausedEvent.InputTuple, + NotPausedEvent.OutputTuple, + NotPausedEvent.OutputObject + >; + getEvent( + key: "OutboundTransferCancelled" + ): TypedContractEvent< + OutboundTransferCancelledEvent.InputTuple, + OutboundTransferCancelledEvent.OutputTuple, + OutboundTransferCancelledEvent.OutputObject + >; + getEvent( + key: "OutboundTransferQueued" + ): TypedContractEvent< + OutboundTransferQueuedEvent.InputTuple, + OutboundTransferQueuedEvent.OutputTuple, + OutboundTransferQueuedEvent.OutputObject + >; + getEvent( + key: "OutboundTransferRateLimited" + ): TypedContractEvent< + OutboundTransferRateLimitedEvent.InputTuple, + OutboundTransferRateLimitedEvent.OutputTuple, + OutboundTransferRateLimitedEvent.OutputObject + >; + getEvent( + key: "OwnershipTransferred" + ): TypedContractEvent< + OwnershipTransferredEvent.InputTuple, + OwnershipTransferredEvent.OutputTuple, + OwnershipTransferredEvent.OutputObject + >; + getEvent( + key: "Paused" + ): TypedContractEvent< + PausedEvent.InputTuple, + PausedEvent.OutputTuple, + PausedEvent.OutputObject + >; + getEvent( + key: "PauserTransferred" + ): TypedContractEvent< + PauserTransferredEvent.InputTuple, + PauserTransferredEvent.OutputTuple, + PauserTransferredEvent.OutputObject + >; + getEvent( + key: "PeerUpdated" + ): TypedContractEvent< + PeerUpdatedEvent.InputTuple, + PeerUpdatedEvent.OutputTuple, + PeerUpdatedEvent.OutputObject + >; + getEvent( + key: "ThresholdChanged" + ): TypedContractEvent< + ThresholdChangedEvent.InputTuple, + ThresholdChangedEvent.OutputTuple, + ThresholdChangedEvent.OutputObject + >; + getEvent( + key: "TransceiverAdded" + ): TypedContractEvent< + TransceiverAddedEvent.InputTuple, + TransceiverAddedEvent.OutputTuple, + TransceiverAddedEvent.OutputObject + >; + getEvent( + key: "TransceiverRemoved" + ): TypedContractEvent< + TransceiverRemovedEvent.InputTuple, + TransceiverRemovedEvent.OutputTuple, + TransceiverRemovedEvent.OutputObject + >; + getEvent( + key: "TransferRedeemed" + ): TypedContractEvent< + TransferRedeemedEvent.InputTuple, + TransferRedeemedEvent.OutputTuple, + TransferRedeemedEvent.OutputObject + >; + getEvent( + key: "TransferSent" + ): TypedContractEvent< + TransferSentEvent.InputTuple, + TransferSentEvent.OutputTuple, + TransferSentEvent.OutputObject + >; + getEvent( + key: "Upgraded" + ): TypedContractEvent< + UpgradedEvent.InputTuple, + UpgradedEvent.OutputTuple, + UpgradedEvent.OutputObject + >; + + filters: { + "AdminChanged(address,address)": TypedContractEvent< + AdminChangedEvent.InputTuple, + AdminChangedEvent.OutputTuple, + AdminChangedEvent.OutputObject + >; + AdminChanged: TypedContractEvent< + AdminChangedEvent.InputTuple, + AdminChangedEvent.OutputTuple, + AdminChangedEvent.OutputObject + >; + + "BeaconUpgraded(address)": TypedContractEvent< + BeaconUpgradedEvent.InputTuple, + BeaconUpgradedEvent.OutputTuple, + BeaconUpgradedEvent.OutputObject + >; + BeaconUpgraded: TypedContractEvent< + BeaconUpgradedEvent.InputTuple, + BeaconUpgradedEvent.OutputTuple, + BeaconUpgradedEvent.OutputObject + >; + + "InboundTransferQueued(bytes32)": TypedContractEvent< + InboundTransferQueuedEvent.InputTuple, + InboundTransferQueuedEvent.OutputTuple, + InboundTransferQueuedEvent.OutputObject + >; + InboundTransferQueued: TypedContractEvent< + InboundTransferQueuedEvent.InputTuple, + InboundTransferQueuedEvent.OutputTuple, + InboundTransferQueuedEvent.OutputObject + >; + + "Initialized(uint64)": TypedContractEvent< + InitializedEvent.InputTuple, + InitializedEvent.OutputTuple, + InitializedEvent.OutputObject + >; + Initialized: TypedContractEvent< + InitializedEvent.InputTuple, + InitializedEvent.OutputTuple, + InitializedEvent.OutputObject + >; + + "MessageAlreadyExecuted(bytes32,bytes32)": TypedContractEvent< + MessageAlreadyExecutedEvent.InputTuple, + MessageAlreadyExecutedEvent.OutputTuple, + MessageAlreadyExecutedEvent.OutputObject + >; + MessageAlreadyExecuted: TypedContractEvent< + MessageAlreadyExecutedEvent.InputTuple, + MessageAlreadyExecutedEvent.OutputTuple, + MessageAlreadyExecutedEvent.OutputObject + >; + + "MessageAttestedTo(bytes32,address,uint8)": TypedContractEvent< + MessageAttestedToEvent.InputTuple, + MessageAttestedToEvent.OutputTuple, + MessageAttestedToEvent.OutputObject + >; + MessageAttestedTo: TypedContractEvent< + MessageAttestedToEvent.InputTuple, + MessageAttestedToEvent.OutputTuple, + MessageAttestedToEvent.OutputObject + >; + + "NotPaused(bool)": TypedContractEvent< + NotPausedEvent.InputTuple, + NotPausedEvent.OutputTuple, + NotPausedEvent.OutputObject + >; + NotPaused: TypedContractEvent< + NotPausedEvent.InputTuple, + NotPausedEvent.OutputTuple, + NotPausedEvent.OutputObject + >; + + "OutboundTransferCancelled(uint256,address,uint256)": TypedContractEvent< + OutboundTransferCancelledEvent.InputTuple, + OutboundTransferCancelledEvent.OutputTuple, + OutboundTransferCancelledEvent.OutputObject + >; + OutboundTransferCancelled: TypedContractEvent< + OutboundTransferCancelledEvent.InputTuple, + OutboundTransferCancelledEvent.OutputTuple, + OutboundTransferCancelledEvent.OutputObject + >; + + "OutboundTransferQueued(uint64)": TypedContractEvent< + OutboundTransferQueuedEvent.InputTuple, + OutboundTransferQueuedEvent.OutputTuple, + OutboundTransferQueuedEvent.OutputObject + >; + OutboundTransferQueued: TypedContractEvent< + OutboundTransferQueuedEvent.InputTuple, + OutboundTransferQueuedEvent.OutputTuple, + OutboundTransferQueuedEvent.OutputObject + >; + + "OutboundTransferRateLimited(address,uint64,uint256,uint256)": TypedContractEvent< + OutboundTransferRateLimitedEvent.InputTuple, + OutboundTransferRateLimitedEvent.OutputTuple, + OutboundTransferRateLimitedEvent.OutputObject + >; + OutboundTransferRateLimited: TypedContractEvent< + OutboundTransferRateLimitedEvent.InputTuple, + OutboundTransferRateLimitedEvent.OutputTuple, + OutboundTransferRateLimitedEvent.OutputObject + >; + + "OwnershipTransferred(address,address)": TypedContractEvent< + OwnershipTransferredEvent.InputTuple, + OwnershipTransferredEvent.OutputTuple, + OwnershipTransferredEvent.OutputObject + >; + OwnershipTransferred: TypedContractEvent< + OwnershipTransferredEvent.InputTuple, + OwnershipTransferredEvent.OutputTuple, + OwnershipTransferredEvent.OutputObject + >; + + "Paused(bool)": TypedContractEvent< + PausedEvent.InputTuple, + PausedEvent.OutputTuple, + PausedEvent.OutputObject + >; + Paused: TypedContractEvent< + PausedEvent.InputTuple, + PausedEvent.OutputTuple, + PausedEvent.OutputObject + >; + + "PauserTransferred(address,address)": TypedContractEvent< + PauserTransferredEvent.InputTuple, + PauserTransferredEvent.OutputTuple, + PauserTransferredEvent.OutputObject + >; + PauserTransferred: TypedContractEvent< + PauserTransferredEvent.InputTuple, + PauserTransferredEvent.OutputTuple, + PauserTransferredEvent.OutputObject + >; + + "PeerUpdated(uint16,bytes32,uint8,bytes32,uint8)": TypedContractEvent< + PeerUpdatedEvent.InputTuple, + PeerUpdatedEvent.OutputTuple, + PeerUpdatedEvent.OutputObject + >; + PeerUpdated: TypedContractEvent< + PeerUpdatedEvent.InputTuple, + PeerUpdatedEvent.OutputTuple, + PeerUpdatedEvent.OutputObject + >; + + "ThresholdChanged(uint8,uint8)": TypedContractEvent< + ThresholdChangedEvent.InputTuple, + ThresholdChangedEvent.OutputTuple, + ThresholdChangedEvent.OutputObject + >; + ThresholdChanged: TypedContractEvent< + ThresholdChangedEvent.InputTuple, + ThresholdChangedEvent.OutputTuple, + ThresholdChangedEvent.OutputObject + >; + + "TransceiverAdded(address,uint256,uint8)": TypedContractEvent< + TransceiverAddedEvent.InputTuple, + TransceiverAddedEvent.OutputTuple, + TransceiverAddedEvent.OutputObject + >; + TransceiverAdded: TypedContractEvent< + TransceiverAddedEvent.InputTuple, + TransceiverAddedEvent.OutputTuple, + TransceiverAddedEvent.OutputObject + >; + + "TransceiverRemoved(address,uint8)": TypedContractEvent< + TransceiverRemovedEvent.InputTuple, + TransceiverRemovedEvent.OutputTuple, + TransceiverRemovedEvent.OutputObject + >; + TransceiverRemoved: TypedContractEvent< + TransceiverRemovedEvent.InputTuple, + TransceiverRemovedEvent.OutputTuple, + TransceiverRemovedEvent.OutputObject + >; + + "TransferRedeemed(bytes32)": TypedContractEvent< + TransferRedeemedEvent.InputTuple, + TransferRedeemedEvent.OutputTuple, + TransferRedeemedEvent.OutputObject + >; + TransferRedeemed: TypedContractEvent< + TransferRedeemedEvent.InputTuple, + TransferRedeemedEvent.OutputTuple, + TransferRedeemedEvent.OutputObject + >; + + "TransferSent(bytes32,bytes32,uint256,uint256,uint16,uint64)": TypedContractEvent< + TransferSentEvent.InputTuple, + TransferSentEvent.OutputTuple, + TransferSentEvent.OutputObject + >; + TransferSent: TypedContractEvent< + TransferSentEvent.InputTuple, + TransferSentEvent.OutputTuple, + TransferSentEvent.OutputObject + >; + + "Upgraded(address)": TypedContractEvent< + UpgradedEvent.InputTuple, + UpgradedEvent.OutputTuple, + UpgradedEvent.OutputObject + >; + Upgraded: TypedContractEvent< + UpgradedEvent.InputTuple, + UpgradedEvent.OutputTuple, + UpgradedEvent.OutputObject + >; + }; +} diff --git a/sdk/evm/src/ethers-contracts/1_1_0/WormholeTransceiver.ts b/sdk/evm/src/ethers-contracts/1_1_0/WormholeTransceiver.ts new file mode 100644 index 000000000..7026c288a --- /dev/null +++ b/sdk/evm/src/ethers-contracts/1_1_0/WormholeTransceiver.ts @@ -0,0 +1,1279 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumberish, + BytesLike, + FunctionFragment, + Result, + Interface, + EventFragment, + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; +import type { + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, + TypedListener, + TypedContractMethod, +} from "./common.js"; + +export declare namespace IWormholeTransceiver { + export type WormholeTransceiverInstructionStruct = { + shouldSkipRelayerSend: boolean; + }; + + export type WormholeTransceiverInstructionStructOutput = [ + shouldSkipRelayerSend: boolean + ] & { shouldSkipRelayerSend: boolean }; +} + +export declare namespace TransceiverStructs { + export type TransceiverInstructionStruct = { + index: BigNumberish; + payload: BytesLike; + }; + + export type TransceiverInstructionStructOutput = [ + index: bigint, + payload: string + ] & { index: bigint; payload: string }; + + export type TransceiverMessageStruct = { + sourceNttManagerAddress: BytesLike; + recipientNttManagerAddress: BytesLike; + nttManagerPayload: BytesLike; + transceiverPayload: BytesLike; + }; + + export type TransceiverMessageStructOutput = [ + sourceNttManagerAddress: string, + recipientNttManagerAddress: string, + nttManagerPayload: string, + transceiverPayload: string + ] & { + sourceNttManagerAddress: string; + recipientNttManagerAddress: string; + nttManagerPayload: string; + transceiverPayload: string; + }; +} + +export interface WormholeTransceiverInterface extends Interface { + getFunction( + nameOrSignature: + | "WORMHOLE_TRANSCEIVER_VERSION" + | "consistencyLevel" + | "encodeWormholeTransceiverInstruction" + | "gasLimit" + | "getMigratesImmutables" + | "getNttManagerOwner" + | "getNttManagerToken" + | "getTransceiverType" + | "getWormholePeer" + | "initialize" + | "isPaused" + | "isSpecialRelayingEnabled" + | "isVAAConsumed" + | "isWormholeEvmChain" + | "isWormholeRelayingEnabled" + | "migrate" + | "nttManager" + | "nttManagerToken" + | "owner" + | "parseWormholeTransceiverInstruction" + | "pauser" + | "quoteDeliveryPrice" + | "receiveMessage" + | "receiveWormholeMessages" + | "sendMessage" + | "setIsSpecialRelayingEnabled" + | "setIsWormholeEvmChain" + | "setIsWormholeRelayingEnabled" + | "setWormholePeer" + | "specialRelayer" + | "transferOwnership" + | "transferPauserCapability" + | "transferTransceiverOwnership" + | "upgrade" + | "wormhole" + | "wormholeRelayer" + ): FunctionFragment; + + getEvent( + nameOrSignatureOrTopic: + | "AdminChanged" + | "BeaconUpgraded" + | "Initialized" + | "NotPaused" + | "OwnershipTransferred" + | "Paused" + | "PauserTransferred" + | "ReceivedMessage" + | "ReceivedRelayedMessage" + | "RelayingInfo" + | "SendTransceiverMessage" + | "SetIsSpecialRelayingEnabled" + | "SetIsWormholeEvmChain" + | "SetIsWormholeRelayingEnabled" + | "SetWormholePeer" + | "Upgraded" + ): EventFragment; + + encodeFunctionData( + functionFragment: "WORMHOLE_TRANSCEIVER_VERSION", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "consistencyLevel", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "encodeWormholeTransceiverInstruction", + values: [IWormholeTransceiver.WormholeTransceiverInstructionStruct] + ): string; + encodeFunctionData(functionFragment: "gasLimit", values?: undefined): string; + encodeFunctionData( + functionFragment: "getMigratesImmutables", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getNttManagerOwner", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getNttManagerToken", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getTransceiverType", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getWormholePeer", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "initialize", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "isPaused", values?: undefined): string; + encodeFunctionData( + functionFragment: "isSpecialRelayingEnabled", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "isVAAConsumed", + values: [BytesLike] + ): string; + encodeFunctionData( + functionFragment: "isWormholeEvmChain", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "isWormholeRelayingEnabled", + values: [BigNumberish] + ): string; + encodeFunctionData(functionFragment: "migrate", values?: undefined): string; + encodeFunctionData( + functionFragment: "nttManager", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "nttManagerToken", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "owner", values?: undefined): string; + encodeFunctionData( + functionFragment: "parseWormholeTransceiverInstruction", + values: [BytesLike] + ): string; + encodeFunctionData(functionFragment: "pauser", values?: undefined): string; + encodeFunctionData( + functionFragment: "quoteDeliveryPrice", + values: [BigNumberish, TransceiverStructs.TransceiverInstructionStruct] + ): string; + encodeFunctionData( + functionFragment: "receiveMessage", + values: [BytesLike] + ): string; + encodeFunctionData( + functionFragment: "receiveWormholeMessages", + values: [BytesLike, BytesLike[], BytesLike, BigNumberish, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "sendMessage", + values: [ + BigNumberish, + TransceiverStructs.TransceiverInstructionStruct, + BytesLike, + BytesLike, + BytesLike + ] + ): string; + encodeFunctionData( + functionFragment: "setIsSpecialRelayingEnabled", + values: [BigNumberish, boolean] + ): string; + encodeFunctionData( + functionFragment: "setIsWormholeEvmChain", + values: [BigNumberish, boolean] + ): string; + encodeFunctionData( + functionFragment: "setIsWormholeRelayingEnabled", + values: [BigNumberish, boolean] + ): string; + encodeFunctionData( + functionFragment: "setWormholePeer", + values: [BigNumberish, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "specialRelayer", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transferOwnership", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "transferPauserCapability", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "transferTransceiverOwnership", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "upgrade", + values: [AddressLike] + ): string; + encodeFunctionData(functionFragment: "wormhole", values?: undefined): string; + encodeFunctionData( + functionFragment: "wormholeRelayer", + values?: undefined + ): string; + + decodeFunctionResult( + functionFragment: "WORMHOLE_TRANSCEIVER_VERSION", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "consistencyLevel", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "encodeWormholeTransceiverInstruction", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "gasLimit", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getMigratesImmutables", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getNttManagerOwner", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getNttManagerToken", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getTransceiverType", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getWormholePeer", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isPaused", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "isSpecialRelayingEnabled", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isVAAConsumed", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isWormholeEvmChain", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isWormholeRelayingEnabled", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "migrate", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "nttManager", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "nttManagerToken", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "parseWormholeTransceiverInstruction", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "pauser", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "quoteDeliveryPrice", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "receiveMessage", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "receiveWormholeMessages", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "sendMessage", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setIsSpecialRelayingEnabled", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setIsWormholeEvmChain", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setIsWormholeRelayingEnabled", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setWormholePeer", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "specialRelayer", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "transferOwnership", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "transferPauserCapability", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "transferTransceiverOwnership", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "upgrade", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "wormhole", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "wormholeRelayer", + data: BytesLike + ): Result; +} + +export namespace AdminChangedEvent { + export type InputTuple = [previousAdmin: AddressLike, newAdmin: AddressLike]; + export type OutputTuple = [previousAdmin: string, newAdmin: string]; + export interface OutputObject { + previousAdmin: string; + newAdmin: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace BeaconUpgradedEvent { + export type InputTuple = [beacon: AddressLike]; + export type OutputTuple = [beacon: string]; + export interface OutputObject { + beacon: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace InitializedEvent { + export type InputTuple = [version: BigNumberish]; + export type OutputTuple = [version: bigint]; + export interface OutputObject { + version: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace NotPausedEvent { + export type InputTuple = [notPaused: boolean]; + export type OutputTuple = [notPaused: boolean]; + export interface OutputObject { + notPaused: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace OwnershipTransferredEvent { + export type InputTuple = [previousOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [previousOwner: string, newOwner: string]; + export interface OutputObject { + previousOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace PausedEvent { + export type InputTuple = [paused: boolean]; + export type OutputTuple = [paused: boolean]; + export interface OutputObject { + paused: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace PauserTransferredEvent { + export type InputTuple = [oldPauser: AddressLike, newPauser: AddressLike]; + export type OutputTuple = [oldPauser: string, newPauser: string]; + export interface OutputObject { + oldPauser: string; + newPauser: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace ReceivedMessageEvent { + export type InputTuple = [ + digest: BytesLike, + emitterChainId: BigNumberish, + emitterAddress: BytesLike, + sequence: BigNumberish + ]; + export type OutputTuple = [ + digest: string, + emitterChainId: bigint, + emitterAddress: string, + sequence: bigint + ]; + export interface OutputObject { + digest: string; + emitterChainId: bigint; + emitterAddress: string; + sequence: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace ReceivedRelayedMessageEvent { + export type InputTuple = [ + digest: BytesLike, + emitterChainId: BigNumberish, + emitterAddress: BytesLike + ]; + export type OutputTuple = [ + digest: string, + emitterChainId: bigint, + emitterAddress: string + ]; + export interface OutputObject { + digest: string; + emitterChainId: bigint; + emitterAddress: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace RelayingInfoEvent { + export type InputTuple = [ + relayingType: BigNumberish, + refundAddress: BytesLike, + deliveryPayment: BigNumberish + ]; + export type OutputTuple = [ + relayingType: bigint, + refundAddress: string, + deliveryPayment: bigint + ]; + export interface OutputObject { + relayingType: bigint; + refundAddress: string; + deliveryPayment: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace SendTransceiverMessageEvent { + export type InputTuple = [ + recipientChain: BigNumberish, + message: TransceiverStructs.TransceiverMessageStruct + ]; + export type OutputTuple = [ + recipientChain: bigint, + message: TransceiverStructs.TransceiverMessageStructOutput + ]; + export interface OutputObject { + recipientChain: bigint; + message: TransceiverStructs.TransceiverMessageStructOutput; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace SetIsSpecialRelayingEnabledEvent { + export type InputTuple = [chainId: BigNumberish, isRelayingEnabled: boolean]; + export type OutputTuple = [chainId: bigint, isRelayingEnabled: boolean]; + export interface OutputObject { + chainId: bigint; + isRelayingEnabled: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace SetIsWormholeEvmChainEvent { + export type InputTuple = [chainId: BigNumberish, isEvm: boolean]; + export type OutputTuple = [chainId: bigint, isEvm: boolean]; + export interface OutputObject { + chainId: bigint; + isEvm: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace SetIsWormholeRelayingEnabledEvent { + export type InputTuple = [chainId: BigNumberish, isRelayingEnabled: boolean]; + export type OutputTuple = [chainId: bigint, isRelayingEnabled: boolean]; + export interface OutputObject { + chainId: bigint; + isRelayingEnabled: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace SetWormholePeerEvent { + export type InputTuple = [chainId: BigNumberish, peerContract: BytesLike]; + export type OutputTuple = [chainId: bigint, peerContract: string]; + export interface OutputObject { + chainId: bigint; + peerContract: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace UpgradedEvent { + export type InputTuple = [implementation: AddressLike]; + export type OutputTuple = [implementation: string]; + export interface OutputObject { + implementation: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export interface WormholeTransceiver extends BaseContract { + connect(runner?: ContractRunner | null): WormholeTransceiver; + waitForDeployment(): Promise; + + interface: WormholeTransceiverInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + WORMHOLE_TRANSCEIVER_VERSION: TypedContractMethod<[], [string], "view">; + + consistencyLevel: TypedContractMethod<[], [bigint], "view">; + + encodeWormholeTransceiverInstruction: TypedContractMethod< + [instruction: IWormholeTransceiver.WormholeTransceiverInstructionStruct], + [string], + "view" + >; + + gasLimit: TypedContractMethod<[], [bigint], "view">; + + getMigratesImmutables: TypedContractMethod<[], [boolean], "view">; + + getNttManagerOwner: TypedContractMethod<[], [string], "view">; + + getNttManagerToken: TypedContractMethod<[], [string], "view">; + + getTransceiverType: TypedContractMethod<[], [string], "view">; + + getWormholePeer: TypedContractMethod< + [chainId: BigNumberish], + [string], + "view" + >; + + initialize: TypedContractMethod<[], [void], "payable">; + + isPaused: TypedContractMethod<[], [boolean], "view">; + + isSpecialRelayingEnabled: TypedContractMethod< + [chainId: BigNumberish], + [boolean], + "view" + >; + + isVAAConsumed: TypedContractMethod<[hash: BytesLike], [boolean], "view">; + + isWormholeEvmChain: TypedContractMethod< + [chainId: BigNumberish], + [boolean], + "view" + >; + + isWormholeRelayingEnabled: TypedContractMethod< + [chainId: BigNumberish], + [boolean], + "view" + >; + + migrate: TypedContractMethod<[], [void], "nonpayable">; + + nttManager: TypedContractMethod<[], [string], "view">; + + nttManagerToken: TypedContractMethod<[], [string], "view">; + + owner: TypedContractMethod<[], [string], "view">; + + parseWormholeTransceiverInstruction: TypedContractMethod< + [encoded: BytesLike], + [IWormholeTransceiver.WormholeTransceiverInstructionStructOutput], + "view" + >; + + pauser: TypedContractMethod<[], [string], "view">; + + quoteDeliveryPrice: TypedContractMethod< + [ + targetChain: BigNumberish, + instruction: TransceiverStructs.TransceiverInstructionStruct + ], + [bigint], + "view" + >; + + receiveMessage: TypedContractMethod< + [encodedMessage: BytesLike], + [void], + "nonpayable" + >; + + receiveWormholeMessages: TypedContractMethod< + [ + payload: BytesLike, + additionalMessages: BytesLike[], + sourceAddress: BytesLike, + sourceChain: BigNumberish, + deliveryHash: BytesLike + ], + [void], + "payable" + >; + + sendMessage: TypedContractMethod< + [ + recipientChain: BigNumberish, + instruction: TransceiverStructs.TransceiverInstructionStruct, + nttManagerMessage: BytesLike, + recipientNttManagerAddress: BytesLike, + refundAddress: BytesLike + ], + [void], + "payable" + >; + + setIsSpecialRelayingEnabled: TypedContractMethod< + [chainId: BigNumberish, isEnabled: boolean], + [void], + "nonpayable" + >; + + setIsWormholeEvmChain: TypedContractMethod< + [chainId: BigNumberish, isEvm: boolean], + [void], + "nonpayable" + >; + + setIsWormholeRelayingEnabled: TypedContractMethod< + [chainId: BigNumberish, isEnabled: boolean], + [void], + "nonpayable" + >; + + setWormholePeer: TypedContractMethod< + [peerChainId: BigNumberish, peerContract: BytesLike], + [void], + "payable" + >; + + specialRelayer: TypedContractMethod<[], [string], "view">; + + transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; + + transferPauserCapability: TypedContractMethod< + [newPauser: AddressLike], + [void], + "nonpayable" + >; + + transferTransceiverOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; + + upgrade: TypedContractMethod< + [newImplementation: AddressLike], + [void], + "nonpayable" + >; + + wormhole: TypedContractMethod<[], [string], "view">; + + wormholeRelayer: TypedContractMethod<[], [string], "view">; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "WORMHOLE_TRANSCEIVER_VERSION" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "consistencyLevel" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "encodeWormholeTransceiverInstruction" + ): TypedContractMethod< + [instruction: IWormholeTransceiver.WormholeTransceiverInstructionStruct], + [string], + "view" + >; + getFunction( + nameOrSignature: "gasLimit" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "getMigratesImmutables" + ): TypedContractMethod<[], [boolean], "view">; + getFunction( + nameOrSignature: "getNttManagerOwner" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getNttManagerToken" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getTransceiverType" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getWormholePeer" + ): TypedContractMethod<[chainId: BigNumberish], [string], "view">; + getFunction( + nameOrSignature: "initialize" + ): TypedContractMethod<[], [void], "payable">; + getFunction( + nameOrSignature: "isPaused" + ): TypedContractMethod<[], [boolean], "view">; + getFunction( + nameOrSignature: "isSpecialRelayingEnabled" + ): TypedContractMethod<[chainId: BigNumberish], [boolean], "view">; + getFunction( + nameOrSignature: "isVAAConsumed" + ): TypedContractMethod<[hash: BytesLike], [boolean], "view">; + getFunction( + nameOrSignature: "isWormholeEvmChain" + ): TypedContractMethod<[chainId: BigNumberish], [boolean], "view">; + getFunction( + nameOrSignature: "isWormholeRelayingEnabled" + ): TypedContractMethod<[chainId: BigNumberish], [boolean], "view">; + getFunction( + nameOrSignature: "migrate" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "nttManager" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "nttManagerToken" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "parseWormholeTransceiverInstruction" + ): TypedContractMethod< + [encoded: BytesLike], + [IWormholeTransceiver.WormholeTransceiverInstructionStructOutput], + "view" + >; + getFunction( + nameOrSignature: "pauser" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "quoteDeliveryPrice" + ): TypedContractMethod< + [ + targetChain: BigNumberish, + instruction: TransceiverStructs.TransceiverInstructionStruct + ], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "receiveMessage" + ): TypedContractMethod<[encodedMessage: BytesLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "receiveWormholeMessages" + ): TypedContractMethod< + [ + payload: BytesLike, + additionalMessages: BytesLike[], + sourceAddress: BytesLike, + sourceChain: BigNumberish, + deliveryHash: BytesLike + ], + [void], + "payable" + >; + getFunction( + nameOrSignature: "sendMessage" + ): TypedContractMethod< + [ + recipientChain: BigNumberish, + instruction: TransceiverStructs.TransceiverInstructionStruct, + nttManagerMessage: BytesLike, + recipientNttManagerAddress: BytesLike, + refundAddress: BytesLike + ], + [void], + "payable" + >; + getFunction( + nameOrSignature: "setIsSpecialRelayingEnabled" + ): TypedContractMethod< + [chainId: BigNumberish, isEnabled: boolean], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setIsWormholeEvmChain" + ): TypedContractMethod< + [chainId: BigNumberish, isEvm: boolean], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setIsWormholeRelayingEnabled" + ): TypedContractMethod< + [chainId: BigNumberish, isEnabled: boolean], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setWormholePeer" + ): TypedContractMethod< + [peerChainId: BigNumberish, peerContract: BytesLike], + [void], + "payable" + >; + getFunction( + nameOrSignature: "specialRelayer" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "transferPauserCapability" + ): TypedContractMethod<[newPauser: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "transferTransceiverOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "upgrade" + ): TypedContractMethod< + [newImplementation: AddressLike], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "wormhole" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "wormholeRelayer" + ): TypedContractMethod<[], [string], "view">; + + getEvent( + key: "AdminChanged" + ): TypedContractEvent< + AdminChangedEvent.InputTuple, + AdminChangedEvent.OutputTuple, + AdminChangedEvent.OutputObject + >; + getEvent( + key: "BeaconUpgraded" + ): TypedContractEvent< + BeaconUpgradedEvent.InputTuple, + BeaconUpgradedEvent.OutputTuple, + BeaconUpgradedEvent.OutputObject + >; + getEvent( + key: "Initialized" + ): TypedContractEvent< + InitializedEvent.InputTuple, + InitializedEvent.OutputTuple, + InitializedEvent.OutputObject + >; + getEvent( + key: "NotPaused" + ): TypedContractEvent< + NotPausedEvent.InputTuple, + NotPausedEvent.OutputTuple, + NotPausedEvent.OutputObject + >; + getEvent( + key: "OwnershipTransferred" + ): TypedContractEvent< + OwnershipTransferredEvent.InputTuple, + OwnershipTransferredEvent.OutputTuple, + OwnershipTransferredEvent.OutputObject + >; + getEvent( + key: "Paused" + ): TypedContractEvent< + PausedEvent.InputTuple, + PausedEvent.OutputTuple, + PausedEvent.OutputObject + >; + getEvent( + key: "PauserTransferred" + ): TypedContractEvent< + PauserTransferredEvent.InputTuple, + PauserTransferredEvent.OutputTuple, + PauserTransferredEvent.OutputObject + >; + getEvent( + key: "ReceivedMessage" + ): TypedContractEvent< + ReceivedMessageEvent.InputTuple, + ReceivedMessageEvent.OutputTuple, + ReceivedMessageEvent.OutputObject + >; + getEvent( + key: "ReceivedRelayedMessage" + ): TypedContractEvent< + ReceivedRelayedMessageEvent.InputTuple, + ReceivedRelayedMessageEvent.OutputTuple, + ReceivedRelayedMessageEvent.OutputObject + >; + getEvent( + key: "RelayingInfo" + ): TypedContractEvent< + RelayingInfoEvent.InputTuple, + RelayingInfoEvent.OutputTuple, + RelayingInfoEvent.OutputObject + >; + getEvent( + key: "SendTransceiverMessage" + ): TypedContractEvent< + SendTransceiverMessageEvent.InputTuple, + SendTransceiverMessageEvent.OutputTuple, + SendTransceiverMessageEvent.OutputObject + >; + getEvent( + key: "SetIsSpecialRelayingEnabled" + ): TypedContractEvent< + SetIsSpecialRelayingEnabledEvent.InputTuple, + SetIsSpecialRelayingEnabledEvent.OutputTuple, + SetIsSpecialRelayingEnabledEvent.OutputObject + >; + getEvent( + key: "SetIsWormholeEvmChain" + ): TypedContractEvent< + SetIsWormholeEvmChainEvent.InputTuple, + SetIsWormholeEvmChainEvent.OutputTuple, + SetIsWormholeEvmChainEvent.OutputObject + >; + getEvent( + key: "SetIsWormholeRelayingEnabled" + ): TypedContractEvent< + SetIsWormholeRelayingEnabledEvent.InputTuple, + SetIsWormholeRelayingEnabledEvent.OutputTuple, + SetIsWormholeRelayingEnabledEvent.OutputObject + >; + getEvent( + key: "SetWormholePeer" + ): TypedContractEvent< + SetWormholePeerEvent.InputTuple, + SetWormholePeerEvent.OutputTuple, + SetWormholePeerEvent.OutputObject + >; + getEvent( + key: "Upgraded" + ): TypedContractEvent< + UpgradedEvent.InputTuple, + UpgradedEvent.OutputTuple, + UpgradedEvent.OutputObject + >; + + filters: { + "AdminChanged(address,address)": TypedContractEvent< + AdminChangedEvent.InputTuple, + AdminChangedEvent.OutputTuple, + AdminChangedEvent.OutputObject + >; + AdminChanged: TypedContractEvent< + AdminChangedEvent.InputTuple, + AdminChangedEvent.OutputTuple, + AdminChangedEvent.OutputObject + >; + + "BeaconUpgraded(address)": TypedContractEvent< + BeaconUpgradedEvent.InputTuple, + BeaconUpgradedEvent.OutputTuple, + BeaconUpgradedEvent.OutputObject + >; + BeaconUpgraded: TypedContractEvent< + BeaconUpgradedEvent.InputTuple, + BeaconUpgradedEvent.OutputTuple, + BeaconUpgradedEvent.OutputObject + >; + + "Initialized(uint64)": TypedContractEvent< + InitializedEvent.InputTuple, + InitializedEvent.OutputTuple, + InitializedEvent.OutputObject + >; + Initialized: TypedContractEvent< + InitializedEvent.InputTuple, + InitializedEvent.OutputTuple, + InitializedEvent.OutputObject + >; + + "NotPaused(bool)": TypedContractEvent< + NotPausedEvent.InputTuple, + NotPausedEvent.OutputTuple, + NotPausedEvent.OutputObject + >; + NotPaused: TypedContractEvent< + NotPausedEvent.InputTuple, + NotPausedEvent.OutputTuple, + NotPausedEvent.OutputObject + >; + + "OwnershipTransferred(address,address)": TypedContractEvent< + OwnershipTransferredEvent.InputTuple, + OwnershipTransferredEvent.OutputTuple, + OwnershipTransferredEvent.OutputObject + >; + OwnershipTransferred: TypedContractEvent< + OwnershipTransferredEvent.InputTuple, + OwnershipTransferredEvent.OutputTuple, + OwnershipTransferredEvent.OutputObject + >; + + "Paused(bool)": TypedContractEvent< + PausedEvent.InputTuple, + PausedEvent.OutputTuple, + PausedEvent.OutputObject + >; + Paused: TypedContractEvent< + PausedEvent.InputTuple, + PausedEvent.OutputTuple, + PausedEvent.OutputObject + >; + + "PauserTransferred(address,address)": TypedContractEvent< + PauserTransferredEvent.InputTuple, + PauserTransferredEvent.OutputTuple, + PauserTransferredEvent.OutputObject + >; + PauserTransferred: TypedContractEvent< + PauserTransferredEvent.InputTuple, + PauserTransferredEvent.OutputTuple, + PauserTransferredEvent.OutputObject + >; + + "ReceivedMessage(bytes32,uint16,bytes32,uint64)": TypedContractEvent< + ReceivedMessageEvent.InputTuple, + ReceivedMessageEvent.OutputTuple, + ReceivedMessageEvent.OutputObject + >; + ReceivedMessage: TypedContractEvent< + ReceivedMessageEvent.InputTuple, + ReceivedMessageEvent.OutputTuple, + ReceivedMessageEvent.OutputObject + >; + + "ReceivedRelayedMessage(bytes32,uint16,bytes32)": TypedContractEvent< + ReceivedRelayedMessageEvent.InputTuple, + ReceivedRelayedMessageEvent.OutputTuple, + ReceivedRelayedMessageEvent.OutputObject + >; + ReceivedRelayedMessage: TypedContractEvent< + ReceivedRelayedMessageEvent.InputTuple, + ReceivedRelayedMessageEvent.OutputTuple, + ReceivedRelayedMessageEvent.OutputObject + >; + + "RelayingInfo(uint8,bytes32,uint256)": TypedContractEvent< + RelayingInfoEvent.InputTuple, + RelayingInfoEvent.OutputTuple, + RelayingInfoEvent.OutputObject + >; + RelayingInfo: TypedContractEvent< + RelayingInfoEvent.InputTuple, + RelayingInfoEvent.OutputTuple, + RelayingInfoEvent.OutputObject + >; + + "SendTransceiverMessage(uint16,tuple)": TypedContractEvent< + SendTransceiverMessageEvent.InputTuple, + SendTransceiverMessageEvent.OutputTuple, + SendTransceiverMessageEvent.OutputObject + >; + SendTransceiverMessage: TypedContractEvent< + SendTransceiverMessageEvent.InputTuple, + SendTransceiverMessageEvent.OutputTuple, + SendTransceiverMessageEvent.OutputObject + >; + + "SetIsSpecialRelayingEnabled(uint16,bool)": TypedContractEvent< + SetIsSpecialRelayingEnabledEvent.InputTuple, + SetIsSpecialRelayingEnabledEvent.OutputTuple, + SetIsSpecialRelayingEnabledEvent.OutputObject + >; + SetIsSpecialRelayingEnabled: TypedContractEvent< + SetIsSpecialRelayingEnabledEvent.InputTuple, + SetIsSpecialRelayingEnabledEvent.OutputTuple, + SetIsSpecialRelayingEnabledEvent.OutputObject + >; + + "SetIsWormholeEvmChain(uint16,bool)": TypedContractEvent< + SetIsWormholeEvmChainEvent.InputTuple, + SetIsWormholeEvmChainEvent.OutputTuple, + SetIsWormholeEvmChainEvent.OutputObject + >; + SetIsWormholeEvmChain: TypedContractEvent< + SetIsWormholeEvmChainEvent.InputTuple, + SetIsWormholeEvmChainEvent.OutputTuple, + SetIsWormholeEvmChainEvent.OutputObject + >; + + "SetIsWormholeRelayingEnabled(uint16,bool)": TypedContractEvent< + SetIsWormholeRelayingEnabledEvent.InputTuple, + SetIsWormholeRelayingEnabledEvent.OutputTuple, + SetIsWormholeRelayingEnabledEvent.OutputObject + >; + SetIsWormholeRelayingEnabled: TypedContractEvent< + SetIsWormholeRelayingEnabledEvent.InputTuple, + SetIsWormholeRelayingEnabledEvent.OutputTuple, + SetIsWormholeRelayingEnabledEvent.OutputObject + >; + + "SetWormholePeer(uint16,bytes32)": TypedContractEvent< + SetWormholePeerEvent.InputTuple, + SetWormholePeerEvent.OutputTuple, + SetWormholePeerEvent.OutputObject + >; + SetWormholePeer: TypedContractEvent< + SetWormholePeerEvent.InputTuple, + SetWormholePeerEvent.OutputTuple, + SetWormholePeerEvent.OutputObject + >; + + "Upgraded(address)": TypedContractEvent< + UpgradedEvent.InputTuple, + UpgradedEvent.OutputTuple, + UpgradedEvent.OutputObject + >; + Upgraded: TypedContractEvent< + UpgradedEvent.InputTuple, + UpgradedEvent.OutputTuple, + UpgradedEvent.OutputObject + >; + }; +} diff --git a/sdk/evm/src/ethers-contracts/1_1_0/common.ts b/sdk/evm/src/ethers-contracts/1_1_0/common.ts new file mode 100644 index 000000000..56b5f21e9 --- /dev/null +++ b/sdk/evm/src/ethers-contracts/1_1_0/common.ts @@ -0,0 +1,131 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + FunctionFragment, + Typed, + EventFragment, + ContractTransaction, + ContractTransactionResponse, + DeferredTopicFilter, + EventLog, + TransactionRequest, + LogDescription, +} from "ethers"; + +export interface TypedDeferredTopicFilter<_TCEvent extends TypedContractEvent> + extends DeferredTopicFilter {} + +export interface TypedContractEvent< + InputTuple extends Array = any, + OutputTuple extends Array = any, + OutputObject = any +> { + (...args: Partial): TypedDeferredTopicFilter< + TypedContractEvent + >; + name: string; + fragment: EventFragment; + getFragment(...args: Partial): EventFragment; +} + +type __TypechainAOutputTuple = T extends TypedContractEvent< + infer _U, + infer W +> + ? W + : never; +type __TypechainOutputObject = T extends TypedContractEvent< + infer _U, + infer _W, + infer V +> + ? V + : never; + +export interface TypedEventLog + extends Omit { + args: __TypechainAOutputTuple & __TypechainOutputObject; +} + +export interface TypedLogDescription + extends Omit { + args: __TypechainAOutputTuple & __TypechainOutputObject; +} + +export type TypedListener = ( + ...listenerArg: [ + ...__TypechainAOutputTuple, + TypedEventLog, + ...undefined[] + ] +) => void; + +export type MinEthersFactory = { + deploy(...a: ARGS[]): Promise; +}; + +export type GetContractTypeFromFactory = F extends MinEthersFactory< + infer C, + any +> + ? C + : never; +export type GetARGsTypeFromFactory = F extends MinEthersFactory + ? Parameters + : never; + +export type StateMutability = "nonpayable" | "payable" | "view"; + +export type BaseOverrides = Omit; +export type NonPayableOverrides = Omit< + BaseOverrides, + "value" | "blockTag" | "enableCcipRead" +>; +export type PayableOverrides = Omit< + BaseOverrides, + "blockTag" | "enableCcipRead" +>; +export type ViewOverrides = Omit; +export type Overrides = S extends "nonpayable" + ? NonPayableOverrides + : S extends "payable" + ? PayableOverrides + : ViewOverrides; + +export type PostfixOverrides, S extends StateMutability> = + | A + | [...A, Overrides]; +export type ContractMethodArgs< + A extends Array, + S extends StateMutability +> = PostfixOverrides<{ [I in keyof A]-?: A[I] | Typed }, S>; + +export type DefaultReturnType = R extends Array ? R[0] : R; + +// export interface ContractMethod = Array, R = any, D extends R | ContractTransactionResponse = R | ContractTransactionResponse> { +export interface TypedContractMethod< + A extends Array = Array, + R = any, + S extends StateMutability = "payable" +> { + (...args: ContractMethodArgs): S extends "view" + ? Promise> + : Promise; + + name: string; + + fragment: FunctionFragment; + + getFragment(...args: ContractMethodArgs): FunctionFragment; + + populateTransaction( + ...args: ContractMethodArgs + ): Promise; + staticCall( + ...args: ContractMethodArgs + ): Promise>; + send(...args: ContractMethodArgs): Promise; + estimateGas(...args: ContractMethodArgs): Promise; + staticCallResult(...args: ContractMethodArgs): Promise; +} diff --git a/sdk/evm/src/ethers-contracts/1_1_0/factories/NttManager__factory.ts b/sdk/evm/src/ethers-contracts/1_1_0/factories/NttManager__factory.ts new file mode 100644 index 000000000..d7d2ef5fd --- /dev/null +++ b/sdk/evm/src/ethers-contracts/1_1_0/factories/NttManager__factory.ts @@ -0,0 +1,1976 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { + Contract, + ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { + Signer, + BigNumberish, + AddressLike, + ContractDeployTransaction, + ContractRunner, +} from "ethers"; +import type { NonPayableOverrides } from "../common.js"; +import type { NttManager, NttManagerInterface } from "../NttManager.js"; + +const _abi = [ + { + type: "constructor", + inputs: [ + { + name: "_token", + type: "address", + internalType: "address", + }, + { + name: "_mode", + type: "uint8", + internalType: "enum IManagerBase.Mode", + }, + { + name: "_chainId", + type: "uint16", + internalType: "uint16", + }, + { + name: "_rateLimitDuration", + type: "uint64", + internalType: "uint64", + }, + { + name: "_skipRateLimiting", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "NTT_MANAGER_VERSION", + inputs: [], + outputs: [ + { + name: "", + type: "string", + internalType: "string", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "attestationReceived", + inputs: [ + { + name: "sourceChainId", + type: "uint16", + internalType: "uint16", + }, + { + name: "sourceNttManagerAddress", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "payload", + type: "tuple", + internalType: "struct TransceiverStructs.NttManagerMessage", + components: [ + { + name: "id", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "sender", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "payload", + type: "bytes", + internalType: "bytes", + }, + ], + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "cancelOutboundQueuedTransfer", + inputs: [ + { + name: "messageSequence", + type: "uint64", + internalType: "uint64", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "chainId", + inputs: [], + outputs: [ + { + name: "", + type: "uint16", + internalType: "uint16", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "completeInboundQueuedTransfer", + inputs: [ + { + name: "digest", + type: "bytes32", + internalType: "bytes32", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "completeOutboundQueuedTransfer", + inputs: [ + { + name: "messageSequence", + type: "uint64", + internalType: "uint64", + }, + ], + outputs: [ + { + name: "", + type: "uint64", + internalType: "uint64", + }, + ], + stateMutability: "payable", + }, + { + type: "function", + name: "executeMsg", + inputs: [ + { + name: "sourceChainId", + type: "uint16", + internalType: "uint16", + }, + { + name: "sourceNttManagerAddress", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "message", + type: "tuple", + internalType: "struct TransceiverStructs.NttManagerMessage", + components: [ + { + name: "id", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "sender", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "payload", + type: "bytes", + internalType: "bytes", + }, + ], + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "getCurrentInboundCapacity", + inputs: [ + { + name: "chainId_", + type: "uint16", + internalType: "uint16", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getCurrentOutboundCapacity", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getInboundLimitParams", + inputs: [ + { + name: "chainId_", + type: "uint16", + internalType: "uint16", + }, + ], + outputs: [ + { + name: "", + type: "tuple", + internalType: "struct IRateLimiter.RateLimitParams", + components: [ + { + name: "limit", + type: "uint72", + internalType: "TrimmedAmount", + }, + { + name: "currentCapacity", + type: "uint72", + internalType: "TrimmedAmount", + }, + { + name: "lastTxTimestamp", + type: "uint64", + internalType: "uint64", + }, + ], + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getInboundQueuedTransfer", + inputs: [ + { + name: "digest", + type: "bytes32", + internalType: "bytes32", + }, + ], + outputs: [ + { + name: "", + type: "tuple", + internalType: "struct IRateLimiter.InboundQueuedTransfer", + components: [ + { + name: "amount", + type: "uint72", + internalType: "TrimmedAmount", + }, + { + name: "txTimestamp", + type: "uint64", + internalType: "uint64", + }, + { + name: "recipient", + type: "address", + internalType: "address", + }, + ], + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getMigratesImmutables", + inputs: [], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getMode", + inputs: [], + outputs: [ + { + name: "", + type: "uint8", + internalType: "uint8", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getOutboundLimitParams", + inputs: [], + outputs: [ + { + name: "", + type: "tuple", + internalType: "struct IRateLimiter.RateLimitParams", + components: [ + { + name: "limit", + type: "uint72", + internalType: "TrimmedAmount", + }, + { + name: "currentCapacity", + type: "uint72", + internalType: "TrimmedAmount", + }, + { + name: "lastTxTimestamp", + type: "uint64", + internalType: "uint64", + }, + ], + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "getOutboundQueuedTransfer", + inputs: [ + { + name: "queueSequence", + type: "uint64", + internalType: "uint64", + }, + ], + outputs: [ + { + name: "", + type: "tuple", + internalType: "struct IRateLimiter.OutboundQueuedTransfer", + components: [ + { + name: "recipient", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "refundAddress", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "amount", + type: "uint72", + internalType: "TrimmedAmount", + }, + { + name: "txTimestamp", + type: "uint64", + internalType: "uint64", + }, + { + name: "recipientChain", + type: "uint16", + internalType: "uint16", + }, + { + name: "sender", + type: "address", + internalType: "address", + }, + { + name: "transceiverInstructions", + type: "bytes", + internalType: "bytes", + }, + ], + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getPeer", + inputs: [ + { + name: "chainId_", + type: "uint16", + internalType: "uint16", + }, + ], + outputs: [ + { + name: "", + type: "tuple", + internalType: "struct INttManager.NttManagerPeer", + components: [ + { + name: "peerAddress", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "tokenDecimals", + type: "uint8", + internalType: "uint8", + }, + ], + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getThreshold", + inputs: [], + outputs: [ + { + name: "", + type: "uint8", + internalType: "uint8", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getTransceiverInfo", + inputs: [], + outputs: [ + { + name: "", + type: "tuple[]", + internalType: "struct TransceiverRegistry.TransceiverInfo[]", + components: [ + { + name: "registered", + type: "bool", + internalType: "bool", + }, + { + name: "enabled", + type: "bool", + internalType: "bool", + }, + { + name: "index", + type: "uint8", + internalType: "uint8", + }, + ], + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getTransceivers", + inputs: [], + outputs: [ + { + name: "result", + type: "address[]", + internalType: "address[]", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "initialize", + inputs: [], + outputs: [], + stateMutability: "payable", + }, + { + type: "function", + name: "isMessageApproved", + inputs: [ + { + name: "digest", + type: "bytes32", + internalType: "bytes32", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "isMessageExecuted", + inputs: [ + { + name: "digest", + type: "bytes32", + internalType: "bytes32", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "isPaused", + inputs: [], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "messageAttestations", + inputs: [ + { + name: "digest", + type: "bytes32", + internalType: "bytes32", + }, + ], + outputs: [ + { + name: "count", + type: "uint8", + internalType: "uint8", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "migrate", + inputs: [], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "mode", + inputs: [], + outputs: [ + { + name: "", + type: "uint8", + internalType: "enum IManagerBase.Mode", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "nextMessageSequence", + inputs: [], + outputs: [ + { + name: "", + type: "uint64", + internalType: "uint64", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "owner", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "pause", + inputs: [], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "pauser", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "quoteDeliveryPrice", + inputs: [ + { + name: "recipientChain", + type: "uint16", + internalType: "uint16", + }, + { + name: "transceiverInstructions", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "rateLimitDuration", + inputs: [], + outputs: [ + { + name: "", + type: "uint64", + internalType: "uint64", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "removeTransceiver", + inputs: [ + { + name: "transceiver", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setInboundLimit", + inputs: [ + { + name: "limit", + type: "uint256", + internalType: "uint256", + }, + { + name: "chainId_", + type: "uint16", + internalType: "uint16", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setOutboundLimit", + inputs: [ + { + name: "limit", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setPeer", + inputs: [ + { + name: "peerChainId", + type: "uint16", + internalType: "uint16", + }, + { + name: "peerContract", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "decimals", + type: "uint8", + internalType: "uint8", + }, + { + name: "inboundLimit", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setThreshold", + inputs: [ + { + name: "threshold", + type: "uint8", + internalType: "uint8", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setTransceiver", + inputs: [ + { + name: "transceiver", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "token", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "tokenDecimals", + inputs: [], + outputs: [ + { + name: "", + type: "uint8", + internalType: "uint8", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "transceiverAttestedToMessage", + inputs: [ + { + name: "digest", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "index", + type: "uint8", + internalType: "uint8", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "transfer", + inputs: [ + { + name: "amount", + type: "uint256", + internalType: "uint256", + }, + { + name: "recipientChain", + type: "uint16", + internalType: "uint16", + }, + { + name: "recipient", + type: "bytes32", + internalType: "bytes32", + }, + ], + outputs: [ + { + name: "", + type: "uint64", + internalType: "uint64", + }, + ], + stateMutability: "payable", + }, + { + type: "function", + name: "transfer", + inputs: [ + { + name: "amount", + type: "uint256", + internalType: "uint256", + }, + { + name: "recipientChain", + type: "uint16", + internalType: "uint16", + }, + { + name: "recipient", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "refundAddress", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "shouldQueue", + type: "bool", + internalType: "bool", + }, + { + name: "transceiverInstructions", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "uint64", + internalType: "uint64", + }, + ], + stateMutability: "payable", + }, + { + type: "function", + name: "transferOwnership", + inputs: [ + { + name: "newOwner", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "transferPauserCapability", + inputs: [ + { + name: "newPauser", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "unpause", + inputs: [], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "upgrade", + inputs: [ + { + name: "newImplementation", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "event", + name: "AdminChanged", + inputs: [ + { + name: "previousAdmin", + type: "address", + indexed: false, + internalType: "address", + }, + { + name: "newAdmin", + type: "address", + indexed: false, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "BeaconUpgraded", + inputs: [ + { + name: "beacon", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "InboundTransferQueued", + inputs: [ + { + name: "digest", + type: "bytes32", + indexed: false, + internalType: "bytes32", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "Initialized", + inputs: [ + { + name: "version", + type: "uint64", + indexed: false, + internalType: "uint64", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "MessageAlreadyExecuted", + inputs: [ + { + name: "sourceNttManager", + type: "bytes32", + indexed: true, + internalType: "bytes32", + }, + { + name: "msgHash", + type: "bytes32", + indexed: true, + internalType: "bytes32", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "MessageAttestedTo", + inputs: [ + { + name: "digest", + type: "bytes32", + indexed: false, + internalType: "bytes32", + }, + { + name: "transceiver", + type: "address", + indexed: false, + internalType: "address", + }, + { + name: "index", + type: "uint8", + indexed: false, + internalType: "uint8", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "NotPaused", + inputs: [ + { + name: "notPaused", + type: "bool", + indexed: false, + internalType: "bool", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "OutboundTransferCancelled", + inputs: [ + { + name: "sequence", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "recipient", + type: "address", + indexed: false, + internalType: "address", + }, + { + name: "amount", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "OutboundTransferQueued", + inputs: [ + { + name: "queueSequence", + type: "uint64", + indexed: false, + internalType: "uint64", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "OutboundTransferRateLimited", + inputs: [ + { + name: "sender", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "sequence", + type: "uint64", + indexed: false, + internalType: "uint64", + }, + { + name: "amount", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "currentCapacity", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "OwnershipTransferred", + inputs: [ + { + name: "previousOwner", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "newOwner", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "Paused", + inputs: [ + { + name: "paused", + type: "bool", + indexed: false, + internalType: "bool", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "PauserTransferred", + inputs: [ + { + name: "oldPauser", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "newPauser", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "PeerUpdated", + inputs: [ + { + name: "chainId_", + type: "uint16", + indexed: true, + internalType: "uint16", + }, + { + name: "oldPeerContract", + type: "bytes32", + indexed: false, + internalType: "bytes32", + }, + { + name: "oldPeerDecimals", + type: "uint8", + indexed: false, + internalType: "uint8", + }, + { + name: "peerContract", + type: "bytes32", + indexed: false, + internalType: "bytes32", + }, + { + name: "peerDecimals", + type: "uint8", + indexed: false, + internalType: "uint8", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "ThresholdChanged", + inputs: [ + { + name: "oldThreshold", + type: "uint8", + indexed: false, + internalType: "uint8", + }, + { + name: "threshold", + type: "uint8", + indexed: false, + internalType: "uint8", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "TransceiverAdded", + inputs: [ + { + name: "transceiver", + type: "address", + indexed: false, + internalType: "address", + }, + { + name: "transceiversNum", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "threshold", + type: "uint8", + indexed: false, + internalType: "uint8", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "TransceiverRemoved", + inputs: [ + { + name: "transceiver", + type: "address", + indexed: false, + internalType: "address", + }, + { + name: "threshold", + type: "uint8", + indexed: false, + internalType: "uint8", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "TransferRedeemed", + inputs: [ + { + name: "digest", + type: "bytes32", + indexed: true, + internalType: "bytes32", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "TransferSent", + inputs: [ + { + name: "recipient", + type: "bytes32", + indexed: false, + internalType: "bytes32", + }, + { + name: "refundAddress", + type: "bytes32", + indexed: false, + internalType: "bytes32", + }, + { + name: "amount", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "fee", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "recipientChain", + type: "uint16", + indexed: false, + internalType: "uint16", + }, + { + name: "msgSequence", + type: "uint64", + indexed: false, + internalType: "uint64", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "Upgraded", + inputs: [ + { + name: "implementation", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "error", + name: "BurnAmountDifferentThanBalanceDiff", + inputs: [ + { + name: "burnAmount", + type: "uint256", + internalType: "uint256", + }, + { + name: "balanceDiff", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + type: "error", + name: "CallerNotTransceiver", + inputs: [ + { + name: "caller", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "CancellerNotSender", + inputs: [ + { + name: "canceller", + type: "address", + internalType: "address", + }, + { + name: "sender", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "CapacityCannotExceedLimit", + inputs: [ + { + name: "newCurrentCapacity", + type: "uint72", + internalType: "TrimmedAmount", + }, + { + name: "newLimit", + type: "uint72", + internalType: "TrimmedAmount", + }, + ], + }, + { + type: "error", + name: "DeliveryPaymentTooLow", + inputs: [ + { + name: "requiredPayment", + type: "uint256", + internalType: "uint256", + }, + { + name: "providedPayment", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + type: "error", + name: "DisabledTransceiver", + inputs: [ + { + name: "transceiver", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "InboundQueuedTransferNotFound", + inputs: [ + { + name: "digest", + type: "bytes32", + internalType: "bytes32", + }, + ], + }, + { + type: "error", + name: "InboundQueuedTransferStillQueued", + inputs: [ + { + name: "digest", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "transferTimestamp", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + type: "error", + name: "InvalidFork", + inputs: [ + { + name: "evmChainId", + type: "uint256", + internalType: "uint256", + }, + { + name: "blockChainId", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + type: "error", + name: "InvalidInitialization", + inputs: [], + }, + { + type: "error", + name: "InvalidMode", + inputs: [ + { + name: "mode", + type: "uint8", + internalType: "uint8", + }, + ], + }, + { + type: "error", + name: "InvalidPauser", + inputs: [ + { + name: "account", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "InvalidPeer", + inputs: [ + { + name: "chainId", + type: "uint16", + internalType: "uint16", + }, + { + name: "peerAddress", + type: "bytes32", + internalType: "bytes32", + }, + ], + }, + { + type: "error", + name: "InvalidPeerChainIdZero", + inputs: [], + }, + { + type: "error", + name: "InvalidPeerDecimals", + inputs: [], + }, + { + type: "error", + name: "InvalidPeerSameChainId", + inputs: [], + }, + { + type: "error", + name: "InvalidPeerZeroAddress", + inputs: [], + }, + { + type: "error", + name: "InvalidRecipient", + inputs: [], + }, + { + type: "error", + name: "InvalidRefundAddress", + inputs: [], + }, + { + type: "error", + name: "InvalidTargetChain", + inputs: [ + { + name: "targetChain", + type: "uint16", + internalType: "uint16", + }, + { + name: "thisChain", + type: "uint16", + internalType: "uint16", + }, + ], + }, + { + type: "error", + name: "InvalidTransceiverZeroAddress", + inputs: [], + }, + { + type: "error", + name: "MessageNotApproved", + inputs: [ + { + name: "msgHash", + type: "bytes32", + internalType: "bytes32", + }, + ], + }, + { + type: "error", + name: "NoEnabledTransceivers", + inputs: [], + }, + { + type: "error", + name: "NonRegisteredTransceiver", + inputs: [ + { + name: "transceiver", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "NotAnEvmAddress", + inputs: [ + { + name: "", + type: "bytes32", + internalType: "bytes32", + }, + ], + }, + { + type: "error", + name: "NotEnoughCapacity", + inputs: [ + { + name: "currentCapacity", + type: "uint256", + internalType: "uint256", + }, + { + name: "amount", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + type: "error", + name: "NotInitializing", + inputs: [], + }, + { + type: "error", + name: "NotMigrating", + inputs: [], + }, + { + type: "error", + name: "NumberOfDecimalsNotEqual", + inputs: [ + { + name: "decimals", + type: "uint8", + internalType: "uint8", + }, + { + name: "decimalsOther", + type: "uint8", + internalType: "uint8", + }, + ], + }, + { + type: "error", + name: "OnlyDelegateCall", + inputs: [], + }, + { + type: "error", + name: "OutboundQueuedTransferNotFound", + inputs: [ + { + name: "queueSequence", + type: "uint64", + internalType: "uint64", + }, + ], + }, + { + type: "error", + name: "OutboundQueuedTransferStillQueued", + inputs: [ + { + name: "queueSequence", + type: "uint64", + internalType: "uint64", + }, + { + name: "transferTimestamp", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + type: "error", + name: "OwnableInvalidOwner", + inputs: [ + { + name: "owner", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "OwnableUnauthorizedAccount", + inputs: [ + { + name: "account", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "PeerNotRegistered", + inputs: [ + { + name: "chainId", + type: "uint16", + internalType: "uint16", + }, + ], + }, + { + type: "error", + name: "ReentrancyGuardReentrantCall", + inputs: [], + }, + { + type: "error", + name: "RefundFailed", + inputs: [ + { + name: "refundAmount", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + type: "error", + name: "RequireContractIsNotPaused", + inputs: [], + }, + { + type: "error", + name: "RequireContractIsPaused", + inputs: [], + }, + { + type: "error", + name: "RetrievedIncorrectRegisteredTransceivers", + inputs: [ + { + name: "retrieved", + type: "uint256", + internalType: "uint256", + }, + { + name: "registered", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + type: "error", + name: "StaticcallFailed", + inputs: [], + }, + { + type: "error", + name: "ThresholdTooHigh", + inputs: [ + { + name: "threshold", + type: "uint256", + internalType: "uint256", + }, + { + name: "transceivers", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + type: "error", + name: "TooManyTransceivers", + inputs: [], + }, + { + type: "error", + name: "TransceiverAlreadyAttestedToMessage", + inputs: [ + { + name: "nttManagerMessageHash", + type: "bytes32", + internalType: "bytes32", + }, + ], + }, + { + type: "error", + name: "TransceiverAlreadyEnabled", + inputs: [ + { + name: "transceiver", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "TransferAmountHasDust", + inputs: [ + { + name: "amount", + type: "uint256", + internalType: "uint256", + }, + { + name: "dust", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + type: "error", + name: "UndefinedRateLimiting", + inputs: [], + }, + { + type: "error", + name: "UnexpectedDeployer", + inputs: [ + { + name: "expectedOwner", + type: "address", + internalType: "address", + }, + { + name: "owner", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "UnexpectedMsgValue", + inputs: [], + }, + { + type: "error", + name: "ZeroAmount", + inputs: [], + }, + { + type: "error", + name: "ZeroThreshold", + inputs: [], + }, +] as const; + +const _bytecode = + "0x61016034620005cb57601f620065b138819003918201601f19168301916001600160401b038311848410176200057e5780849260a094604052833981010312620005cb578051906001600160a01b0382168203620005cb576020810151916002831015620005cb5760408201519161ffff83168303620005cb576060810151906001600160401b03821690818303620005cb576080015180159182158203620005cb5715809281620005c2575b508215620005a6575b505062000594576080527f8561949d1c6242cee5c5a5aeb6b9c190ee611d7742fcec65d9e5b1341ea04d8954620001147e758a264b9bdbe3295fe36bd6ff7abaa122f48bf70e90af04a1b8a32d21e4e15460ff8360081c1614620005d0565b7ffd6568c039679b3b7cc93c26c41d9379b7b1bec1677120493b467688302cb11f5460005b60ff8360081c168110620003f157505060005b60ff8260081c1681106200035d5750604060ff6200016d92161115620005d0565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805460ff8160401c166200034b576002600160401b03196001600160401b03821601620002ff575b50503060a05260c0526101009182526101209081526101404681523360e05260405191615f6393846200064e85396080518481816114d401528181611b1401528181611fb1015281816129e20152818161342d015281816139b5015281816140310152818161554f0152818161566201528181615722015281816158410152615909015260a05184614f95015260c0518481816102900152818161051401528181610561015281816128ce0152818161382501528181613eaf0152818161476d01528181614bac0152614c5c015260e05184611c590152518381816104ab0152818161202a015281816121560152818161291c015281816138a701528181613f2c0152614b3401525182818161137c01528181611e500152818161298501526133b701525181818161044901528181613aa1015281816140f90152818161463e0152614ae60152f35b6001600160401b0319166001600160401b039081179091556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602090a13880620001b6565b60405163f92ee8a960e01b8152600490fd5b60018101808211620003db575b60ff8360081c1681106200038a57506200038490620005ee565b6200014c565b620003d590620003cf6200039e84620005fe565b9054620003ab84620005fe565b9054600391821b1c6001600160a01b039081169390911b9190911c161415620005d0565b620005ee565b6200036a565b634e487b7160e01b600052601160045260246000fd5b620003fc81620005fe565b9054600382901b81901c6001600160a01b031660009081527f49bca747e973430e858f2f5de357b8dba36ea6d375b81bdb5d53dfaabf0b3a7f602052604090819020905192906001600160401b0360608501908111908511176200057e5760608401604052546200049e60ff821615801592838752602087019360ff808360081c1615928315875260101c16908160408a01529262000561575b5050620005d0565b60018060401b03600160ff6040870151161b87161615159051151592600092835b60ff8a60081c1681106200050f575b5050508262000509959492620004ee620003cf95620004f79414620005d0565b151514620005d0565b60ff60408188169201511610620005d0565b62000139565b6200051a81620005fe565b9054600391821b1c6001600160a01b039081169184901b85901c16146200054c576200054690620005ee565b620004bf565b5060019350849150829050620004ee620004ce565b9091508162000574575b50388062000496565b905015386200056b565b634e487b7160e01b600052604160045260246000fd5b60405163e543ef0560e01b8152600490fd5b15915081620005b9575b503880620000b5565b905038620005b0565b925038620000ac565b600080fd5b15620005d857565b634e487b7160e01b600052600160045260246000fd5b6000198114620003db5760010190565b7e758a264b9bdbe3295fe36bd6ff7abaa122f48bf70e90af04a1b8a32d21e4e18054821015620006375760005260206000200190600090565b634e487b7160e01b600052603260045260246000fdfe6080604052600436101561001257600080fd5b6000803560e01c80630271725014612c5f578063036de8af14612bd45780630677df5414612bb55780630900f0101461274e578063186ce612146126f957806319017175146126c35780631f97c9a8146124d1578063203e4a9b146121ce57806323d75e311461219a578063295a521214612140578063396c16b7146121045780633b97e856146120e95780633f4ba83a146120755780634b4fd03b14612017578063689f90c314611fd557806374aa7bfc14611f915780637c91863414611e025780638129fc1c14611bcd5780638413bcba14611ab15780638456cb5914611a3457806386e11ffa14611a0f57806389c619dd146119af5780638da5cb5b146119795780638e3ba8c9146119425780638fd3ab80146118035780639057412d14611686578063961b94d01461162857806397c35146146113a05780639a8a0592146113615780639d782454146111265780639f86029c14610e105780639fd0506d14610dda578063b150fc5514610c2d578063b187bd2614610bff578063b293f97f14610b69578063b4d591bb14610aa8578063c0b07bde14610a62578063c128d170146109e6578063d788c1471461095b578063da4856a114610928578063e5a986031461087c578063e75235b81461084e578063f2fde38b14610709578063f5cfec18146106e6578063f7514fbc146102bf578063fc0c546a1461027a5763fd96063c1461022257600080fd5b346102775760203660031901126102775760606102406004356154ad565b6040805182516001600160481b031681526020808401516001600160401b031690820152918101516001600160a01b031690820152f35b80fd5b50346102775780600319360112610277576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b5034610277576020366003190112610277576004356001600160401b03811681036106e2576102ec615cfd565b6002600080516020615dce83398151915254146106d0576001600160401b038116600052600080516020615eae83398151915260205260406000206040519061033482612d2f565b805482526001810154602083015261ffff60028201546001600160481b03811660408501526001600160401b038160481c16606085015260881c16608083015260018060a01b0360038201541660a083015260405190818560048301549261039b84613755565b80845293600181169081156106ae575060011461066a575b506103c092500382612db6565b60c08201526001600160401b03606082015116156106495760a08101516001600160a01b031633810361061c5750606061048c60407ff80e572ae1b63e2449629b6c7d783add85c36473926f216077f17ee002bcfd07936001600160401b038616600052600080516020615eae833981519152602052610442826000206137a6565b015161046d7f0000000000000000000000000000000000000000000000000000000000000000615a4d565b610475614c36565b906001600160401b0360ff82169160081c16615b6c565b926001600160401b0360405191168152336020820152836040820152a17f000000000000000000000000000000000000000000000000000000000000000060028110156106065780610556575060405163a9059cbb60e01b602082015233602482015260448101919091526105419061051281606481015b03601f198101835282612db6565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316614438565b6001600080516020615ece8339815191525580f35b600181036105ea57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316803b156105e5576040516340c10f1960e01b815233600482015260248101929092526000908290604490829084905af180156105d9576105ca575b50610541565b6105d390612d1c565b386105c4565b6040513d6000823e3d90fd5b600080fd5b6040516366001a8960e01b815260ff9091166004820152602490fd5b634e487b7160e01b600052602160045260246000fd5b60405163ceb40a8560e01b81523360048201526001600160a01b03919091166024820152604490fd5b0390fd5b604051635feafa3160e11b81526001600160401b0383166004820152602490fd5b60040187525060208620909186915b8183106106925750509060206103c092820101386103b3565b6020919350806001915483858801015201910190918392610679565b9050602092506103c094915060ff191682840152151560051b820101386103b3565b6040516309e3d0f360e11b8152600490fd5b5080fd5b50346102775780600319360112610277576020610701615496565b604051908152f35b5034610277576020366003190112610277576001600160a01b03600435818116908181036108195761074a9061073d615cc4565b610745615cc4565b615c50565b7f3031d39df71efbb605646fc51d7571499445af538fa6dd17ce8c07e8118ed97891825460ff600080516020615e4e8339815191525416808203610830575050908391825b845481101561082c578460005281817f357eda4c1707ce60b55a439f3dc12fcacea5ca0fd863e2fc179a916cf05fccd1015416803b1561082857848091602460405180948193632c7b84dd60e11b83528960048401525af190811561081d578591610805575b505061080090612ff6565b61078f565b61080e90612d1c565b6108195783386107f5565b8380fd5b6040513d87823e3d90fd5b8480fd5b8380f35b604492506040519163d2a13a2960e01b835260048301526024820152fd5b5034610277578060031936011261027757602060ff600080516020615d4e8339815191525416604051908152f35b50346102775760203660031901126102775760043560ff8116908181036105e5576108a5615cc4565b8115610916577f2a855b929b9a53c6fb5b5ed248b27e502b709c088e036a5aa17620c8fc5085a99161091060ff92600080516020615d4e833981519152805493851985161790556108f4613275565b6040805160ff9490951684168552921660208401528291820190565b0390a180f35b60405163831761d760e01b8152600490fd5b50346102775761093736612e39565b906002600080516020615dce83398151915254146106d0576109589261333e565b80f35b50346102775760203660031901126102775761ffff610978612cb2565b610980614d41565b5016600052600080516020615e6e8339815191526020526109e26109a76040600020615071565b6040519182918291909160406001600160401b038160608401956001600160481b038082511686526020820151166020860152015116910152565b0390f35b50346102775760203660031901126102775761ffff90610a04612cb2565b906020604051610a1381612d65565b828152015216600052600080516020615d2e83398151915260205260408060002060ff8251610a4181612d65565b60208260018554958685520154169101908152835192835251166020820152f35b50346102775780600319360112610277576109e2604051610a8281612d65565b60058152640312e312e360dc1b6020820152604051918291602083526020830190612cf7565b50346102775780600319360112610277576040518091600080516020615e0e83398151915290815480845260208094019081938352600080516020615d6e83398151915290835b818110610b4c5750505084610b05910385612db6565b60405193838594850191818652518092526040850193925b828110610b2c57505050500390f35b83516001600160a01b031685528695509381019392810192600101610b1d565b82546001600160a01b031684529286019260019283019201610aef565b5060c036600319011261027757610b7e612cc3565b906084359182151583036106e25760a4356001600160401b03928382116102775750610bae903690600401612df2565b610bb6615cfd565b6002600080516020615dce83398151915254146106d057602093610be4926064359060443590600435613e93565b6001600080516020615ece8339815191525560405191168152f35b503461027757806003193601126102775760206002600080516020615dce8339815191525414604051908152f35b503461027757806003193601126102775760405180600080516020615e0e83398151915280548084526020809401918552600080516020615d6e83398151915290855b818110610dbd5750505081610c86910382612db6565b8051610c9181612eba565b91610c9f6040519384612db6565b818352601f19610cae83612eba565b01855b818110610da1575050845b828110610d1d575050506040519180830190808452825180925280604085019301945b828110610cec5784840385f35b85518051151585528083015115158584015260409081015160ff169085015294810194606090930192600101610cdf565b929492610d99906001600160a01b03610d368285613005565b5116600052600080516020615e8e8339815191528652604060002060405190610d5e82612d4a565b5460ff9081811615158352818160081c1615158984015260101c166040820152610d888289613005565b52610d938188613005565b50612ff6565b949294610cbc565b8590610dae979597614d41565b82828a01015201959395610cb1565b82546001600160a01b031684529285019260019283019201610c70565b5034610277578060031936011261027757600080516020615eee833981519152546040516001600160a01b039091168152602090f35b5034610277576020806003193601126106e2576001600160a01b0390600435828116919082810361082857610e43615cc4565b82156111145782600052600080516020615e8e83398151915280835260ff918260406000205416156110fb57846000528184528260406000205460081c16156110e25784600052818452604060002061ff001990818154169055600080516020615e4e833981519152928354858160081c169283156110ce5761ff0060001980950160081b169116178455600080516020615dee8339815191528054918860005287526001600160401b03600192610f1082858a60406000205460101c161b198316169282168310614d24565b6001600160401b0319161790558897600080516020615e0e8339815191528054938b5b858110610fc8575b505050505050918091610f836040969594610f767f697a3853515b88013ad432f29f53d406debc9509ed6d9313dcfe115250fcd18f99614d24565b610f7e614d60565b614e4b565b5460081c16600080516020615d4e8339815191529081548381168210610fba575b50505416908351928352820152a1610958613275565b60ff19161781553880610fa4565b838b610fd383613244565b929054600393841b1c1614610ff15750610fec90612ff6565b610f33565b9590918093959798999a9b9c5081019081116110ba57906110258461101861104494613244565b905490891b1c1691613244565b90919082549060031b9160018060a01b03809116831b921b1916179055565b825480156110a657946040999794610f83948a9894610f76947f697a3853515b88013ad432f29f53d406debc9509ed6d9313dcfe115250fcd18f9e9c99019261108c84613244565b81939154921b1b1916905555998496979899839650610f3b565b634e487b7160e01b8c52603160045260248cfd5b634e487b7160e01b8d52601160045260248dfd5b634e487b7160e01b8b52601160045260248bfd5b6040516307d86e9160e21b815260048101869052602490fd5b604051630d583f4760e41b815260048101869052602490fd5b604051632f44bd7760e01b8152600490fd5b50346102775761113536612e39565b9033600052600080516020615e8e83398151915260209080825260ff60406000205460081c161561134957600080516020615dce8339815191529160028354146106d05761ffff861680600052600080516020615d2e8339815191528252846040600020540361132b575060405163b3f07bbd60e01b8152918183806111bf898b60048401613314565b038173__$93083e246e55d56d98f3df2872cd16bfd0$__5af49283156113205788936112f1575b503360005280825261120360ff60406000205460101c168461320e565b6112d85760606112b793927f35a2101eaac94b493e0dfca061f9a7f087913fde8678e7cde0aca9897edba0e592336000528082528a6001600160401b03610100600160481b03604082600160ff836000205460101c161b1693898152600080516020615d8e833981519152875220928354928360081c161760081b1690610100600160481b03191617905533600052815260ff60406000205460101c166040519185835233908301526040820152a16131a1565b6112bf578480f35b546002146106d0576112d09261333e565b388080808480f35b604051631089c4a160e11b815260048101849052602490fd5b9092508181813d8311611319575b6113098183612db6565b810103126105e5575191386111e6565b503d6112ff565b6040513d8a823e3d90fd5b6044908560405191635788c0fd60e11b835260048301526024820152fd5b60405163a0ae911d60e01b8152336004820152602490fd5b5034610277578060031936011261027757602060405161ffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b506020366003190112610277576001600160401b0360043516908160043503610277576113cb615cfd565b6002600080516020615dce83398151915254146106d05781600052600080516020615eae8339815191526020526040600020916040519261140b84612d2f565b805484526001810154602085015261ffff60028201546001600160481b03811660408701526001600160401b038160481c16606087015260881c16608085015260018060a01b0360038201541660a08501526040518381949060048401549361147385613755565b808552946001811690811561160457506001146115bf575b505061149992500383612db6565b60c083019182526001600160401b03606084015116156115a7576114ca6001600160401b0360608501511642613194565b6001600160401b037f0000000000000000000000000000000000000000000000000000000000000000161161157c579161155991602093600052600080516020615eae833981519152845261152260406000206137a6565b6001600160481b036040830151169161ffff608082015116815190868301519260a0600180821b0391015116935194600435614632565b6001600080516020615ece833981519152556001600160401b0360405191168152f35b6044906001600160401b036060850151166040519163c06cf05f60e01b835260048301526024820152fd5b60249060405190635feafa3160e11b82526004820152fd5b60049193949250018252602082205b8183106115e857505090602061149992820101388061148b565b60209193508060019154838589010152019101909184926115ce565b9150506020925061149994915060ff191682840152151560051b820101388061148b565b5060603660031901126102775761163d612cc3565b604435611648615cfd565b6002600080516020615dce83398151915254146106d05760209181611559926040519261167484612d65565b60018452853681860137600435613808565b5034610277576040366003190112610277576116a0612cb2565b6024356001600160401b0381116117ff576116bf903690600401612df2565b91604051918290600080516020615e0e833981519152828154918287526020809701908652600080516020615d6e83398151915292865b888282106117e05750505061170d92500383612db6565b826117378351966040519788928392635b10743960e11b8452604060048501526044840190612cf7565b906024830152038173__$93083e246e55d56d98f3df2872cd16bfd0$__5af49081156117d55783949561177094926117b1575b50613039565b604051926040840160408552835180915285606086019401915b81811061179d5750505082938301520390f35b82518552938601939186019160010161178a565b6117ce9192503d8087833e6117c68183612db6565b810190612f24565b903861176a565b6040513d85823e3d90fd5b85546001600160a01b03168452600195860195889550930192016116f6565b8280fd5b503461027757806003193601126102775761181c614f92565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0080546001600160401b0380821690600182019181831161192c5760ff8460401c1690811561191f575b5061190d57600160401b911680926001600160481b03191617179081835560ff7f7487ca88d037ca20519908b1ee7556206bef53bce0226a348750cb9d4f688e4e5416156118fb577fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2926020926118db613275565b6118e3614d60565b68ff000000000000000019169055604051908152a180f35b604051632866815360e11b8152600490fd5b60405163f92ee8a960e01b8152600490fd5b9050818316111538611866565b634e487b7160e01b600052601160045260246000fd5b50346102775760403660031901126102775760243560ff811681036105e55761196f60209160043561320e565b6040519015158152f35b5034610277578060031936011261027757600080516020615dae833981519152546040516001600160a01b039091168152602090f35b503461027757602036600319011261027757611a046001600160401b036020926040600080516020615dee83398151915254916004358152600080516020615d8e8339815191528652205460081c1616615a8e565b60ff60405191168152f35b5034610277578060031936011261027757611a28614d41565b506109e26109a7615029565b5034610277578060031936011261027757600080516020615dae83398151915254611a67906001600160a01b0316614fd6565b600080516020615dce83398151915260028154146106d057600290557f0e2fb031ee032dc02d8011dc50b816eb450cf856abd8261680dac74f72165bd2602060405160018152a180f35b503461027757602036600319011261027757600435611ace615cfd565b6002600080516020615dce83398151915254146106d057611aee816154ad565b602081016001600160401b03908181511615611bb457611b118282511642613194565b827f00000000000000000000000000000000000000000000000000000000000000001611611b92578385527f4e8909a01183a67951f5a6147d6e76ed02ea890c72afea01a9edee91edc609b8602052604080862086815560010186905583015183518691610541916001600160481b0316906001600160a01b031687614adb565b516040516301cb739d60e71b8152600481019490945216602483015250604490fd5b604051630301bcaf60e61b815260048101859052602490fd5b508060031936011261027757611be1614f92565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805460ff8160401c1615906001600160401b03811680159081611dfa575b6001149081611df0575b159081611de7575b5061190d5767ffffffffffffffff198116600117835581611dc8575b50611c57615c0f565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0381163303611d9f575034611d8d57611c96615c0f565b611c9e615c0f565b611ca6615c0f565b6001600080516020615dce83398151915255600080516020615eee83398151915280546001600160a01b03191633179055611cdf615c0f565b611ce7615c0f565b611cf033615c50565b611cf8615c0f565b611d00615c0f565b6001600080516020615ece83398151915255611d37610100600160481b0360ff611d30611d2b614c36565b615b35565b16176150d1565b611d3f613275565b611d47614d60565b611d4f575080f35b68ff00000000000000001981541690557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a180f35b60405163bd28e88960e01b8152600490fd5b604051636345072160e11b81526001600160a01b03919091166004820152336024820152604490fd5b68ffffffffffffffffff19166801000000000000000117825538611c4e565b90501538611c32565b303b159150611c2a565b839150611c20565b503461027757608036600319011261027757611e1c612cb2565b60243560443560ff81168091036105e557611e35615cc4565b61ffff809316928315611f7f578215611f6d578115611f5b577f0000000000000000000000000000000000000000000000000000000000000000168314611f49577f1456404e7f41f35c3daac941bb50bad417a66275c3040061b4287d787719599d9160809184600052600080516020615d2e833981519152918260205260ff604060002081600160405192611eca84612d65565b805484520154169460208201958652886000526020526001604060002084815501848319825416179055611f2c611f0b611f02614c36565b80606435615bc7565b89600052600080516020615e6e8339815191526020526040600020906152cf565b51935116604051938452602084015260408301526060820152a280f35b60405163101b8f9560e11b8152600490fd5b60405163ade64f0b60e01b8152600490fd5b60405163f839a0cb60e01b8152600490fd5b60405163100b0f2760e11b8152600490fd5b503461027757806003193601126102775760206040516001600160401b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b5034610277578060031936011261027757602060ff7f5443fea4dc453d96b81ce55b62e11a4094cc4cbb8a360956a7253cfdb42506cb54166040519015158152f35b50346102775780600319360112610277577f00000000000000000000000000000000000000000000000000000000000000009060028210156120615760208260ff60405191168152f35b634e487b7160e01b81526021600452602490fd5b503461027757806003193601126102775761208e615cc4565b600080516020615dce83398151915260028154036120d757600190557fe11c2112add17fb763d3bd59f63b10429c3e11373da4fb8ef6725107a2fdc4b06020604051838152a180f35b604051637e38d1d360e11b8152600490fd5b50346102775780600319360112610277576020611a04614c36565b50346102775760203660031901126102775760ff60406020926004358152600080516020615d8e83398151915284522054166040519015158152f35b50346102775780600319360112610277576040517f0000000000000000000000000000000000000000000000000000000000000000600281101561218657602092508152f35b634e487b7160e01b83526021600452602483fd5b503461027757806003193601126102775760206001600160401b03600080516020615e2e8339815191525416604051908152f35b5034610277576020806003193601126106e2576004356001600160a01b03811691828203610819576121fe615cc4565b82156111145782600052600080516020615e8e8339815191529182825260ff9081604060002054166000146123a75784600052838352604060002061010061ff00198254161790555b600080516020615e0e83398151915290815491600160401b831015612391578261102591600161227995019055613244565b600080516020615e4e83398151915292835461ff0061229c848360081c16614d13565b60081b169061ff00191617809455600080516020615dee83398151915280546001600160401b0390818116918860005284875260018660406000205460101c161b1682179182146123785767ffffffffffffffff19161790557ff05962b5774c658e85ed80c91a75af9d66d2af2253dda480f90bce78aff5eda594606094909390929091612328614d60565b84600052825280600080516020615d4e833981519152805482811615612369575b5054169260405194855260081c16908301526040820152a1610958613275565b60ff1916600117815538612349565b604051638d68f84d60e01b815260048101899052602490fd5b634e487b7160e01b600052604160045260246000fd5b600080516020615e4e8339815191528281541660408110156124bf57604051906123d082612d4a565b6001825285820190600182526040830190815288600052878752604060002092511515918662ff000061ff0086549351151560081b16935160101b1693169062ffffff19161717179055805483612428818316614d13565b169060ff19161790557f3031d39df71efbb605646fc51d7571499445af538fa6dd17ce8c07e8118ed978805490600160401b82101561239157600182018082558210156124a9576000527f357eda4c1707ce60b55a439f3dc12fcacea5ca0fd863e2fc179a916cf05fccd10180546001600160a01b03191686179055612247565b634e487b7160e01b600052603260045260246000fd5b60405163891684c360e01b8152600490fd5b5034610277576020366003190112610277576004356001600160401b0381168091036106e257606060c060405161250781612d2f565b84815284602082015284604082015284838201528460808201528460a08201520152600052600080516020615eae83398151915260205260406000206040519061255082612d2f565b805482526001810154602083015261ffff60028201546001600160481b03811660408501526001600160401b038160481c16606085015260881c16608083015260018060a01b0360038201541660a0830152604051838194906004840154936125b885613755565b808552946001811690811561269f575060011461265a575b50506125de92500383612db6565b60c081019182526109e26040519283926020845280516020850152602081015160408501526001600160481b0360408201511660608501526001600160401b03606082015116608085015261ffff60808201511660a085015260a0600180821b039101511660c08401525160e080840152610100830190612cf7565b60049193949250018252602082205b8183106126835750509060206125de9282010138806125d0565b6020919350806001915483858901015201910190918492612669565b915050602092506125de94915060ff191682840152151560051b82010138806125d0565b5034610277576020366003190112610277576126dd615cc4565b6109586126f46126eb614c36565b80600435615bc7565b6150d1565b503461027757604036600319011261027757610958612716612cc3565b61271e615cc4565b61ffff61272c6126eb614c36565b9116600052600080516020615e6e8339815191526020526040600020906152cf565b5034610277576020806003193601126106e2576001600160a01b03600435818116908181036108285761277f615cc4565b612787614f92565b3b15612b5a577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b031916821790557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b8480a27f7487ca88d037ca20519908b1ee7556206bef53bce0226a348750cb9d4f688e4e9182549161281460ff841615614d24565b60ff199283166001178455303b156108285760405163011fa75760e71b8152858160048183305af18015612b0f57612b47575b5060405163689f90c360e01b81528281600481305afa908115612b0f578691612b1a575b50156128a3575b50507f5443fea4dc453d96b81ce55b62e11a4094cc4cbb8a360956a7253cfdb42506cb818154169055815416905580f35b604051637e062a3560e11b81528281600481305afa908115612b0f578691612ad1575b50816128f6927f000000000000000000000000000000000000000000000000000000000000000016911614614d24565b6040516314ad290960e11b81528181600481305afa90811561081d578591612a9b575b507f0000000000000000000000000000000000000000000000000000000000000000906002821015612a87576002811015612a87576129589114614d24565b604051634d4502c960e11b81528181600481305afa801561081d578590612a51575b6129ad915061ffff807f000000000000000000000000000000000000000000000000000000000000000016911614614d24565b604051631d2a9eff60e21b8152908082600481305afa90811561081d578591612a11575b50612a0a91506001600160401b03807f000000000000000000000000000000000000000000000000000000000000000016911614614d24565b3880612872565b905081813d8311612a4a575b612a278183612db6565b8101031261081957516001600160401b038116810361081957612a0a90386129d1565b503d612a1d565b508181813d8311612a80575b612a678183612db6565b8101031261082857612a7b6129ad9161332f565b61297a565b503d612a5d565b634e487b7160e01b86526021600452602486fd5b90508181813d8311612aca575b612ab28183612db6565b81010312610828575160028110156108285738612919565b503d612aa8565b90508281813d8311612b08575b612ae88183612db6565b81010312612b045751908082168203612b0457906128f66128c6565b8580fd5b503d612ade565b6040513d88823e3d90fd5b612b3a9150833d8511612b40575b612b328183612db6565b810190614420565b3861286b565b503d612b28565b612b5390959195612d1c565b9338612847565b60405162461bcd60e51b815260048101849052602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608490fd5b503461027757602036600319011261027757602061196f6004356131a1565b5034610277576020366003190112610277576004356001600160a01b03818116918290036117ff57612c1681600080516020615dae8339815191525416614fd6565b600080516020615eee83398151915280546001600160a01b031981168417909155167f51c4874e0f23f262e04a38c51751336dde72126d67f53eb672aaff02996b3ef68380a380f35b50346102775760203660031901126102775761070161046d612cad604060209461ffff612c8a612cb2565b612c92614d41565b50168152600080516020615e6e833981519152865220615071565b615543565b6004359061ffff821682036105e557565b6024359061ffff821682036105e557565b60005b838110612ce75750506000910152565b8181015183820152602001612cd7565b90602091612d1081518092818552858086019101612cd4565b601f01601f1916010190565b6001600160401b03811161239157604052565b60e081019081106001600160401b0382111761239157604052565b606081019081106001600160401b0382111761239157604052565b604081019081106001600160401b0382111761239157604052565b608081019081106001600160401b0382111761239157604052565b60a081019081106001600160401b0382111761239157604052565b90601f801991011681019081106001600160401b0382111761239157604052565b6001600160401b03811161239157601f01601f191660200190565b81601f820112156105e557803590612e0982612dd7565b92612e176040519485612db6565b828452602083830101116105e557816000926020809301838601378301015290565b90600319906060828401126105e55760043561ffff811681036105e5579260243592604435916001600160401b03918284116105e55760609084830301126105e55760405192612e8884612d4a565b806004013584526024810135602085015260448101359283116105e557612eb29201600401612df2565b604082015290565b6001600160401b0381116123915760051b60200190565b519060ff821682036105e557565b81601f820112156105e5578051612ef581612dd7565b92612f036040519485612db6565b818452602082840101116105e557612f219160208085019101612cd4565b90565b9060209081838203126105e55782516001600160401b03938482116105e557019080601f830112156105e5578151612f5b81612eba565b94604090612f6b82519788612db6565b828752858088019360051b860101948486116105e557868101935b868510612f9857505050505050505090565b84518381116105e55782019084601f1983890301126105e557845190612fbd82612d65565b612fc88a8401612ed1565b825285830151918583116105e557612fe7898c80969581960101612edf565b83820152815201940193612f86565b600019811461192c5760010190565b80518210156124a95760209160051b010190565b9060406020612f219360ff81511684520151918160208201520190612cf7565b90929180519161304883612eba565b9260409161305883519586612db6565b818552601f1961306783612eba565b01602090368288013760009788955b84871061308857505050505050509190565b909192939495988685613101868d6130a760018060a01b039188613005565b511680600052600080516020615e8e83398151915282526130d260ff866000205460101c1689613005565b51908551808095819463b5634c7360e01b835261ffff60049916898401526024998a8401526044830190613019565b03915afa90811561318957908d91600091613157575b5061312381928d613005565b5283018093116131445750506131399099612ff6565b959493929190613076565b601190634e487b7160e01b600052526000fd5b91508782813d8311613182575b61316e8183612db6565b810103126102775750518c90613123613117565b503d613164565b8a513d6000823e3d90fd5b9190820391821161192c57565b6001600160401b039060ff6131fa81600080516020615d4e8339815191525416938493600080516020615dee8339815191525490600052600080516020615d8e83398151915260205260406000205460081c1616615a8e565b1610159081613207575090565b9050151590565b906001600160401b0391600052600080516020615d8e833981519152602052600160ff60406000205460081c92161b1616151590565b600080516020615e0e83398151915280548210156124a957600052600080516020615d6e8339815191520190600090565b60ff600080516020615d4e833981519152541660405161329481612d65565b60ff600080516020615e4e83398151915254818116835260081c168060208301528083116132cf57505160ff166132c85750565b1561091657565b82604491604051916313c3d1b160e01b835260048301526024820152fd5b9060606040612f219380518452602081015160208501520151918160408201520190612cf7565b60409061ffff612f21949316815281602082015201906132ed565b519061ffff821682036105e557565b91908161334b9184613635565b9190916136305760408091015191815192635399ded560e11b8452608084806133806020948560048401526024830190612cf7565b038173__$93083e246e55d56d98f3df2872cd16bfd0$__5af4938415613625576000946135b0575b5061ffff9283606086015116847f0000000000000000000000000000000000000000000000000000000000000000168082036135955750506133e8614c36565b816134118751928061340c816001600160401b03968760ff82169160081c16615b6c565b615bc7565b960151908160a01c61357e576001600160a01b039182169560007f0000000000000000000000000000000000000000000000000000000000000000831615613577575061345c614d41565b508816600052600080516020615e6e8339815191528452613482612cad84600020615071565b61348c8882615b00565b81808960081c169160081c16105b6134bf57505050506134af6134bd9484615836565b6134b883615716565b614adb565b565b7f7f63c9251d82a933210c2b6d0b0f116252c3c116788120e64e8e8215df6f316297509561355b83959694976001939451926134fa84612d4a565b6001600160481b038091168452898401908242168252888501978852896000527f4e8909a01183a67951f5a6147d6e76ed02ea890c72afea01a9edee91edc609b88b52886000209451166001600160481b0319855416178455511682615a25565b019151166001600160601b0360a01b82541617905551908152a1565b905061349a565b50602491519063033b960d60e41b82526004820152fd5b6044925191631ee5902560e11b835260048301526024820152fd5b6080949194813d821161361d575b816135cb60809383612db6565b810103126106e2578351916135df83612d80565b8151906001600160481b038216820361027757508252848101518583015283810151848301526136119060600161332f565b606082015292386133a8565b3d91506135be565b83513d6000823e3d90fd5b505050565b60405163b3f07bbd60e01b81529193926020918391829161365a919060048401613314565b038173__$93083e246e55d56d98f3df2872cd16bfd0$__5af49081156105d9576000916136eb575b5061368c816131a1565b156136d35761369a8161371c565b92836136a857509150600090565b7f4069dff8c9df7e38d2867c0910bd96fd61787695e5380281148c04932d02bef2600080a360009190565b60249060405190630451c4fb60e41b82526004820152fd5b906020823d8211613714575b8161370460209383612db6565b8101031261027757505138613682565b3d91506136f7565b600052600080516020615d8e8339815191526020526040600020805460ff811661374e5760ff19166001179055600090565b5050600190565b90600182811c92168015613785575b602083101461376f57565b634e487b7160e01b600052602260045260246000fd5b91607f1691613764565b81811061379a575050565b6000815560010161378f565b6004600091828155826001820155826002820155826003820155016137cb8154613755565b806137d557505050565b82601f82116001146137e657505055565b9091808252613804601f60208420940160051c84016001850161378f565b5555565b9194939290946000958315613e81578115613e6f578215613e5d577f000000000000000000000000000000000000000000000000000000000000000061384e3082614cb6565b9061389160018060a01b03821696604051906323b872dd60e01b602083015233602483015230604483015260648201526064815261388b81612d9b565b87614438565b6138a48261389f3084614cb6565b613194565b957f00000000000000000000000000000000000000000000000000000000000000006002811015613e49579060018b9214613dc2575b5050505061ffff8116600052600080516020615d2e83398151915260205260ff600160406000200154168015611f5b5761391d613915614c36565b918287615bc7565b906001600160401b038260081c1661393a60ff8416928383615b6c565b808803613d9b575061395c61396191613954611d2b614c36565b938491615b6c565b6155ee565b98600080516020615e2e83398151915254966001600160401b0380891614613d875767ffffffffffffffff1988166001600160401b03898116600101811691909117600080516020615e2e833981519152557f00000000000000000000000000000000000000000000000000000000000000001615613d81576139e2614d41565b506139ee612cad615029565b613a0b8c610100600160481b0360ff87169160081b161782615b00565b6001600160401b03808d610100600160481b0360ff88169160081b161760081c169160081c16105b613d5b578180613d53575b613a8757505082612f219899610100600160481b0360ff84613a6b82613a779716848660081b1617615656565b169160081b16176158fe565b6001600160401b03339516614632565b61ffff95979896919a506001600160481b03939250613ac57f0000000000000000000000000000000000000000000000000000000000000000615a4d565b613acd615496565b604051916001600160401b038b168352602083015260408201527ff33512b84e24a49905c26c6991942fc5a9652411769fc1e448f967cdb049f08a60603392a260405196613b1a88612d2f565b875260208701521660408501526001600160401b03421660608501521660808301523360a083015260c08201526001600160401b038216600052600080516020615eae83398151915260205260c0600460406000208351815560208401516001820155600281016001600160481b036040860151166001600160481b0319825416178155613bb56001600160401b0360608701511682615a25565b608085015181549061ffff60881b9060881b169061ffff60881b19161790556003810160018060a01b0360a0860151166001600160601b0360a01b82541617905501910151938451906001600160401b038211613d3f57613c168354613755565b601f8111613d04575b50602090601f8311600114613c9857906001600160401b03959683613c8d575b50508160011b916000199060031b1c19161790555b7f69add1952a6a6b9cb86f04d05f0cb605cbb469a50ae916139d34495a9991481f60206040518484168152a1613c89346145db565b1690565b015190503880613c3f565b95601f19831684885260208820975b818110613cec5750916001600160401b03969791846001959410613cd3575b505050811b019055613c54565b015160001960f88460031b161c19169055388080613cc6565b83830151895560019098019760209384019301613ca7565b613d2f9084835260208320601f850160051c81019160208610613d35575b601f0160051c019061378f565b38613c1f565b9091508190613d22565b634e487b7160e01b81526041600452602490fd5b506000613a3e565b604490613d66615496565b90604051916326fb55dd60e01b835260048301526024820152fd5b81613a33565b634e487b7160e01b82526011600452602482fd5b87613da860449282613194565b604051916338f831a560e11b835260048301526024820152fd5b803b156106e2578190602460405180948193630852cd8d60e31b83528c60048401525af18015613e3e57613e29575b50613dfd903090614cb6565b808203613e0b5788816138da565b60449250604051916302156a8f60e01b835260048301526024820152fd5b98613e37613dfd929a612d1c565b9890613df1565b6040513d8c823e3d90fd5b634e487b7160e01b8b52602160045260248bfd5b60405163717f139360e11b8152600490fd5b604051634e46966960e11b8152600490fd5b604051631f2a200560e01b8152600490fd5b95949392919060008715613e81578215613e6f578315613e5d577f0000000000000000000000000000000000000000000000000000000000000000613ed83082614cb6565b90613f1b60018060a01b0382169a604051906323b872dd60e01b6020830152336024830152306044830152606482015260648152613f1581612d9b565b8b614438565b613f298261389f3084614cb6565b997f0000000000000000000000000000000000000000000000000000000000000000600281101561440c576001146143a2575b50505061ffff8216600052600080516020615d2e83398151915260205260ff600160406000200154168015611f5b57613f9e613f96614c36565b91828b615bc7565b916001600160401b038360081c16613fbb60ff8516938483615b6c565b808c03614395575061395c613fdd91613fd5611d2b614c36565b948591615b6c565b99600080516020615e2e83398151915254976001600160401b03808a16146143815767ffffffffffffffff1989166001600160401b038a8116600101811691909117600080516020615e2e833981519152557f0000000000000000000000000000000000000000000000000000000000000000161561437b5761405e614d41565b508b6001600160401b0380614074612cad615029565b9260081b610100600160481b031660ff8816176140918185615b00565b60081c169160081c16105b811580614374575b6143695781614361575b506140df57505082612f219899610100600160481b0360ff613a7794169160081b16176140da81615656565b6158fe565b61ffff95979896919a506001600160481b0393925061411d7f0000000000000000000000000000000000000000000000000000000000000000615a4d565b614125615496565b604051916001600160401b038b168352602083015260408201527ff33512b84e24a49905c26c6991942fc5a9652411769fc1e448f967cdb049f08a60603392a26040519661417288612d2f565b875260208701521660408501526001600160401b03421660608501521660808301523360a083015260c08201526001600160401b038216600052600080516020615eae83398151915260205260c0600460406000208351815560208401516001820155600281016001600160481b036040860151166001600160481b031982541617815561420d6001600160401b0360608701511682615a25565b608085015181549061ffff60881b9060881b169061ffff60881b19161790556003810160018060a01b0360a0860151166001600160601b0360a01b82541617905501910151938451906001600160401b038211613d3f5761426e8354613755565b601f8111614331575b50602090601f83116001146142df57906001600160401b03959683613c8d5750508160011b916000199060031b1c19161790557f69add1952a6a6b9cb86f04d05f0cb605cbb469a50ae916139d34495a9991481f60206040518484168152a1613c89346145db565b95601f19831684885260208820975b8181106143195750916001600160401b03969791846001959410613cd357505050811b019055613c54565b838301518955600190980197602093840193016142ee565b61435b9084835260208320601f850160051c81019160208610613d3557601f0160051c019061378f565b38614277565b9050386140ae565b604483613d66615496565b50806140a4565b8261409c565b634e487b7160e01b83526011600452602483fd5b8b613da860449282613194565b803b156108195783809160248d6040519485938492630852cd8d60e31b845260048401525af18015614401576143ec575b506143df903090614cb6565b808203613e0b5780613f5c565b926143fa6143df9294612d1c565b92906143d3565b6040513d86823e3d90fd5b634e487b7160e01b85526021600452602485fd5b908160209103126105e5575180151581036105e55790565b604051614496916001600160a01b031661445182612d65565b6000806020958685527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656487860152868151910182855af1614490614512565b91614542565b805190816144a357505050565b82806144b3938301019101614420565b156144bb5750565b6084906040519062461bcd60e51b82526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152fd5b3d1561453d573d9061452382612dd7565b916145316040519384612db6565b82523d6000602084013e565b606090565b919290156145a45750815115614556575090565b3b1561455f5790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156145b75750805190602001fd5b60405162461bcd60e51b815260206004820152908190610645906024830190612cf7565b600080808084335af16145ec614512565b50156145f55750565b60249060405190630b288dc560e21b82526004820152fd5b906020828203126105e55781516001600160401b0381116105e557612f219201612edf565b959492949391936146627f0000000000000000000000000000000000000000000000000000000000000000615a4d565b6040518081600080516020615e0e83398151915260208154938481520190600052600080516020615d6e8339815191529260005b818110614ab95750506146ab92500382612db6565b7f3031d39df71efbb605646fc51d7571499445af538fa6dd17ce8c07e8118ed9785491815115614aa7576146fe6000916040519485928392635b10743960e11b8452604060048501526044840190612cf7565b906024830152038173__$93083e246e55d56d98f3df2872cd16bfd0$__5af49182156105d957600092614a8a575b50614738818388613039565b95863410614a6b5761474a8734613194565b80614a5c575b506040519061475e82612d80565b6001600160481b0386811683527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166020840190815260408085018d815261ffff8d81166060880190815292516315cfa3cb60e11b81529651909416600487015291516024860152905160448501525116606483015260008260848173__$93083e246e55d56d98f3df2872cd16bfd0$__5af49182156105d95761485d926000928d928492614a40575b506001600160401b036040519361482685612d4a565b16835260018060a01b031660208301526040820152604051809381926311692f3760e31b83526020600484015260248301906132ed565b038173__$93083e246e55d56d98f3df2872cd16bfd0$__5af49081156105d957600091614a1d575b5061ffff8816600052600080516020615d2e833981519152602052604060002054938351938515614a015760005b8581106149265750505050505050927fe54e51e42099622516fa3b48e9733581c9dbdcb771cafb093f745a0532a35982949261ffff926148f760c096610475614c36565b906040519586526020860152604085015260608401521660808201526001600160401b03841660a0820152a190565b6001600160a01b036149388284613005565b5116906149458187613005565b5182600052600080516020615e8e83398151915260205261497160ff60406000205460101c1686613005565b51833b156105e5576149b79361ffff8f936000948f8e906149c98d6040519b8c998a988997634b5b050560e01b895216600488015260a0602488015260a4870190613019565b85810360031901604487015290612cf7565b916064840152608483015203925af19182156105d9576149ed926149f25750612ff6565b6148b3565b6149fb90612d1c565b38610d93565b604051630ebc95af60e21b815261ffff8b166004820152602490fd5b614a3a91503d806000833e614a328183612db6565b81019061460d565b38614885565b614a559192503d8086833e614a328183612db6565b9038614810565b614a65906145db565b38614750565b6040516306a91e3760e51b815260048101889052346024820152604490fd5b614aa09192503d806000833e6117c68183612db6565b903861472c565b6040516334e7b19560e11b8152600490fd5b84546001600160a01b0316835260019485019486945060209093019201614696565b9291614b0a9061046d7f0000000000000000000000000000000000000000000000000000000000000000615a4d565b906000937f504e6efe18ab9eed10dc6501a417f5b12a2f7f2b1593aed9b89f9bce3cf29a918580a27f00000000000000000000000000000000000000000000000000000000000000009360028510156120615784614b9f575060405163a9059cbb60e01b60208201526001600160a01b03909116602482015260448101919091529091506134bd906105128160648101610504565b9193600181036105ea57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690813b156117ff576040516340c10f1960e01b81526001600160a01b03919091166004820152602481019490945291929181908390604490829084905af1908115614c2a5750614c215750565b6134bd90612d1c565b604051903d90823e3d90fd5b600080604051602081019063313ce56760e01b825260048152614c5881612d65565b51907f00000000000000000000000000000000000000000000000000000000000000005afa614c85614512565b9015614ca4576020818051810103126105e5576020612f219101612ed1565b604051631222cd8360e01b8152600490fd5b6040516370a0823160e01b602082019081526001600160a01b039093166024808301919091528152600092839291614ced81612d4a565b51915afa614cf9614512565b9015614ca4576020818051810103126105e5576020015190565b60ff1660ff811461192c5760010190565b15614d2b57565b634e487b7160e01b600052600160045260246000fd5b60405190614d4e82612d4a565b60006040838281528260208201520152565b600080516020615e4e8339815191525460ff8160081c16614d91600080516020615e0e833981519152548214614d24565b60005b818110614e1f575060005b818110614db8575050604060ff6134bd92161115614d24565b6001810180821161192c575b828110614dda5750614dd590612ff6565b614d9f565b614e1a90614e15614dea84613244565b905490614df684613244565b92909160018060a01b03809354600395861b1c16931b1c161415614d24565b612ff6565b614dc4565b80614e15614e2f614e4693613244565b905460039190911b1c6001600160a01b0316614e4b565b614d94565b6001600160a01b039081166000818152600080516020615e8e8339815191526020526040908190209051929190614e8184612d4a565b5460ff91614ebd838316158015938488526020880197604087808460081c16159384158c5260101c1691019581875292614f78575b5050614d24565b600080516020615dee83398151915254946001600160401b0360019687868651161b1616151590511515916000968791600080516020615e4e8339815191525497878960081c16935b848110614f3a575b5050505050816134bd96614f28869594614f309414614d24565b151514614d24565b5116911611614d24565b8282614f4583613244565b90549060031b1c1614614f6057614f5b90612ff6565b614f06565b50919850849250839150614f289050826134bd614f0e565b90915081614f89575b503880614eb6565b90501538614f81565b307f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614614fc457565b604051633c64f99360e21b8152600490fd5b600080516020615eee83398151915254336001600160a01b03918216141591908261501c575b505061500457565b60405163e2a08e5d60e01b8152336004820152602490fd5b1633141590503880614ffc565b6040519061503682612d4a565b8160406001600160401b03600080516020615f0e833981519152546001600160481b0380821685528160481c16602085015260901c16910152565b9060405161507e81612d4a565b60406001600160401b038294546001600160481b0380821685528160481c16602085015260901c16910152565b90600160481b600160901b0382549160481b1690600160481b600160901b031916179055565b600080516020615f0e8339815191529081546001600160481b03908181166001600160401b036008918184841c168015806152c4575b15615175575050855471ffffffffffffffffff0000000000000000001916604886901b600160481b600160901b03161786555050505b825479ffffffffffffffff000000000000000000ffffffffffffffffff19169116174260901b67ffffffffffffffff60901b16179055565b86615181612cad615029565b92600061518e8383615ade565b1561525a57506151ad92916151a291615b00565b8388861c1690615a75565b610100600160481b039290841b831660ff8616176151cb8184615ade565b1561524c578160ff92826151e26151ef9487615b00565b871c169084871c16615a75565b9116921b16175b6152008482615ade565b61522a57600160481b600160901b039060481b1690600160481b600160901b03191617835561513d565b604051631e74e8fb60e31b815290831660048201528383166024820152604490fd5b5050905060ff9150166151f6565b949395929061526c9061527693615b00565b8389841c16615a75565b9260ff881694838087610100600160481b038098871b16176152988185615b00565b851c1691841c16019283116152b057501b16176151f6565b634e487b7160e01b81526011600452602490fd5b5060ff851615615107565b919080546001600160481b03808216916001600160401b03926008908483831c1680158061548b575b1561535e5750505050846153106134bd9596856150ab565b835467ffffffffffffffff60901b19919092161679ffffffffffffffff000000000000000000ffffffffffffffffff1990911617429190911660901b67ffffffffffffffff60901b16179055565b85908961536d612cad8a615071565b93600061537a8383615ade565b1561543557509161539261539d9260ff979894615b00565b838c881c1690615a75565b610100600160481b039490861b85169116176153b98184615ade565b156154275760ff91816153cf6153dc9386615b00565b861c168784871c16615a75565b9116921b16175b6153ed8682615ade565b61540557946154006134bd9596856150ab565b615310565b604051631e74e8fb60e31b815290821660048201529085166024820152604490fd5b5050905060ff9150166153e3565b949650615450935061544691615b00565b868a851c16615a75565b9160ff891693868086610100600160481b038097861b16176154728185615b00565b841c1691831c1601918683116152b057501b16176153e3565b5060ff8416156152f8565b61549e614d41565b50612f2161046d612cad615029565b6154b5614d41565b506000527f4e8909a01183a67951f5a6147d6e76ed02ea890c72afea01a9edee91edc609b86020526040600020604051906154ef82612d4a565b80546001600160481b038116835260481c6001600160401b03166020830152600101546001600160a01b0316604082015290565b811561552d570490565b634e487b7160e01b600052601260045260246000fd5b6001600160401b0390817f0000000000000000000000000000000000000000000000000000000000000000169182156155d7576155c4828260ff936040610100600160481b03960151164203816155a8602085019889519383875160081c1602615523565b9160081c1601915160081c168082106000146155d057506155ee565b9251169160081b161790565b90506155ee565b506020015160ff16610100600160481b0317919050565b6001600160401b0390818111615602571690565b60405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203660448201526534206269747360d01b6064820152608490fd5b6001600160401b0390817f000000000000000000000000000000000000000000000000000000000000000016156157125761568f614d41565b50600160481b600160901b036156a6612cad615029565b610100600160481b0360ff6156e1600080516020615f0e83398151915296808854976156d28188615b00565b60081c16908560081c16615a75565b92169160081b161760481b16906001600160401b0360901b4260901b1690600160481b600160d01b03191617179055565b5050565b6001600160401b0390817f000000000000000000000000000000000000000000000000000000000000000016156157125761574f614d41565b5061575b612cad615029565b90600160481b600160901b03600080516020615f0e83398151915293845493816001600160401b0360901b4260901b16946157968184615b00565b60081c16828260081c16018281116000146158225750610100600160481b0360ff6157c0846155ee565b92169160081b1617906001600160481b038516906157de8284615b00565b80856001600160401b0360901b1988161760081c16908360081c161060001461581b57505b60481b1691600160481b600160d01b03191617179055565b9050615803565b60ff6157c0610100600160481b03926155ee565b6001600160401b03807f0000000000000000000000000000000000000000000000000000000000000000161561363057610100600160481b0360ff6158f061ffff6134bd96615883614d41565b50169384600052600080516020615e6e833981519152806020526158ad612cad6040600020615071565b60009687526020919091526040909520805467ffffffffffffffff60901b191642831660901b67ffffffffffffffff60901b161781559581906156d28188615b00565b92169160081b1617906150ab565b6001600160401b03807f000000000000000000000000000000000000000000000000000000000000000016156136305761ffff6134bd9361593d614d41565b5016600090808252600080516020615e6e83398151915280602052615967612cad60408520615071565b91835260205260408220805467ffffffffffffffff60901b191642851660901b67ffffffffffffffff60901b161781559383906159a48184615b00565b60081c16838260081c1601838111600014615a115750610100600160481b0360ff6159ce856155ee565b92169160081b1617918084546001600160481b038116936159ef8587615b00565b5060081c16908360081c1610600014615a095750906150ab565b9050906150ab565b60ff6159ce610100600160481b03926155ee565b9067ffffffffffffffff60481b82549160481b169067ffffffffffffffff60481b1916179055565b468103615a575750565b604490604051906377d879fb60e01b82526004820152466024820152fd5b6001600160401b03918216908216039190821161192c57565b60009182915b6001600160401b03908181168015615ad65760001901918211615ac2571691615abc90614d13565b91615a94565b634e487b7160e01b85526011600452602485fd5b505050915090565b90615ae98183615b00565b6001600160401b03809160081c169160081c161190565b60ff9182169116818103615b12575050565b604051635ce6db6160e11b815260ff918216600482015291166024820152604490fd5b60ff811660081015612f215750600890565b9060ff8091169116039060ff821161192c57565b60ff16604d811161192c57600a0a90565b919060ff821660ff8216818114615bc0571115615b9f57615b94612f219392615b9992615b47565b615b5b565b90615523565b615b9490615bac92615b47565b9081810291818304149015171561192c5790565b5050505090565b615bfa61395c60ff92610100600160481b039495615be487615b35565b908581168683161015615c055750958691615b6c565b92169160081b161790565b9050958691615b6c565b60ff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460401c1615615c3e57565b604051631afcd79f60e31b8152600490fd5b6001600160a01b03908116908115615cab57600080516020615dae83398151915280546001600160a01b031981168417909155167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3565b604051631e4fbdf760e01b815260006004820152602490fd5b600080516020615dae833981519152546001600160a01b03163303615ce557565b60405163118cdaa760e01b8152336004820152602490fd5b600080516020615ece8339815191526002815414615d1b5760029055565b604051633ee5aeb560e01b8152600490fdfeebcc9f646b0f459ff8f387587d536b0af3484cf442e1577400f322334e7d1ef047028352a8b3feae1a85fba43bc13f990568bb1637dce33d3dbfd791a0808b7f6c3cb3f3ae91330f31ba2bc0ff8855fc834fb66dc27e8e0b1a398617dabaa5a668dfeeddfa5e4e9adceec01a3aba274bdcbab3f6ac9956417a4332f2b08abdda9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930064bacf405c5d7f563d3ba5252584a52c37e4fee380fd825b10666c27b8258022fd6568c039679b3b7cc93c26c41d9379b7b1bec1677120493b467688302cb11f00758a264b9bdbe3295fe36bd6ff7abaa122f48bf70e90af04a1b8a32d21e4e1ad78307a8b51804c575f26039dcb87c58925afb3b7c08732f3b21b942aed7a768561949d1c6242cee5c5a5aeb6b9c190ee611d7742fcec65d9e5b1341ea04d89efb21dcaedea63b55c44882f329622e13a8d0f5b947b3a372826208a9003da1549bca747e973430e858f2f5de357b8dba36ea6d375b81bdb5d53dfaabf0b3a7f852fa0677fef8612c6c15b518c9fa56761e9ed15cfd5c6e5399e5467985ac7ed9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00bfa91572ce1e5fe8776a160d3b1f862e83f5ee2c080a7423b4761602a3ad12497c25289a27ec8c9be54d4a154cf80490d69bda989cdb8328232e08fea9220420a264697066735822122081c909776f677997190fd4a1b79b6c3e08bfdcafb8b4ccb509cf77192db5fa2464736f6c63430008130033"; + +type NttManagerConstructorParams = + | [linkLibraryAddresses: NttManagerLibraryAddresses, signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: NttManagerConstructorParams +): xs is ConstructorParameters => { + return ( + typeof xs[0] === "string" || + (Array.isArray as (arg: any) => arg is readonly any[])(xs[0]) || + "_isInterface" in xs[0] + ); +}; + +export class NttManager__factory extends ContractFactory { + constructor(...args: NttManagerConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + const [linkLibraryAddresses, signer] = args; + super( + _abi, + NttManager__factory.linkBytecode(linkLibraryAddresses), + signer + ); + } + } + + static linkBytecode( + linkLibraryAddresses: NttManagerLibraryAddresses + ): string { + let linkedBytecode = _bytecode; + + linkedBytecode = linkedBytecode.replace( + new RegExp("__\\$93083e246e55d56d98f3df2872cd16bfd0\\$__", "g"), + linkLibraryAddresses[ + "src/libraries/TransceiverStructs.sol:TransceiverStructs" + ] + .replace(/^0x/, "") + .toLowerCase() + ); + + return linkedBytecode; + } + + override getDeployTransaction( + _token: AddressLike, + _mode: BigNumberish, + _chainId: BigNumberish, + _rateLimitDuration: BigNumberish, + _skipRateLimiting: boolean, + overrides?: NonPayableOverrides & { from?: string } + ): Promise { + return super.getDeployTransaction( + _token, + _mode, + _chainId, + _rateLimitDuration, + _skipRateLimiting, + overrides || {} + ); + } + override deploy( + _token: AddressLike, + _mode: BigNumberish, + _chainId: BigNumberish, + _rateLimitDuration: BigNumberish, + _skipRateLimiting: boolean, + overrides?: NonPayableOverrides & { from?: string } + ) { + return super.deploy( + _token, + _mode, + _chainId, + _rateLimitDuration, + _skipRateLimiting, + overrides || {} + ) as Promise< + NttManager & { + deploymentTransaction(): ContractTransactionResponse; + } + >; + } + override connect(runner: ContractRunner | null): NttManager__factory { + return super.connect(runner) as NttManager__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): NttManagerInterface { + return new Interface(_abi) as NttManagerInterface; + } + static connect(address: string, runner?: ContractRunner | null): NttManager { + return new Contract(address, _abi, runner) as unknown as NttManager; + } +} + +export interface NttManagerLibraryAddresses { + ["src/libraries/TransceiverStructs.sol:TransceiverStructs"]: string; +} diff --git a/sdk/evm/src/ethers-contracts/1_1_0/factories/WormholeTransceiver__factory.ts b/sdk/evm/src/ethers-contracts/1_1_0/factories/WormholeTransceiver__factory.ts new file mode 100644 index 000000000..6839a0f4f --- /dev/null +++ b/sdk/evm/src/ethers-contracts/1_1_0/factories/WormholeTransceiver__factory.ts @@ -0,0 +1,1400 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { + Contract, + ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { + Signer, + BigNumberish, + AddressLike, + ContractDeployTransaction, + ContractRunner, +} from "ethers"; +import type { NonPayableOverrides } from "../common.js"; +import type { + WormholeTransceiver, + WormholeTransceiverInterface, +} from "../WormholeTransceiver.js"; + +const _abi = [ + { + type: "constructor", + inputs: [ + { + name: "nttManager", + type: "address", + internalType: "address", + }, + { + name: "wormholeCoreBridge", + type: "address", + internalType: "address", + }, + { + name: "wormholeRelayerAddr", + type: "address", + internalType: "address", + }, + { + name: "specialRelayerAddr", + type: "address", + internalType: "address", + }, + { + name: "_consistencyLevel", + type: "uint8", + internalType: "uint8", + }, + { + name: "_gasLimit", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "WORMHOLE_TRANSCEIVER_VERSION", + inputs: [], + outputs: [ + { + name: "", + type: "string", + internalType: "string", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "consistencyLevel", + inputs: [], + outputs: [ + { + name: "", + type: "uint8", + internalType: "uint8", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "encodeWormholeTransceiverInstruction", + inputs: [ + { + name: "instruction", + type: "tuple", + internalType: + "struct IWormholeTransceiver.WormholeTransceiverInstruction", + components: [ + { + name: "shouldSkipRelayerSend", + type: "bool", + internalType: "bool", + }, + ], + }, + ], + outputs: [ + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "gasLimit", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getMigratesImmutables", + inputs: [], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getNttManagerOwner", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getNttManagerToken", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getTransceiverType", + inputs: [], + outputs: [ + { + name: "", + type: "string", + internalType: "string", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "getWormholePeer", + inputs: [ + { + name: "chainId", + type: "uint16", + internalType: "uint16", + }, + ], + outputs: [ + { + name: "", + type: "bytes32", + internalType: "bytes32", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "initialize", + inputs: [], + outputs: [], + stateMutability: "payable", + }, + { + type: "function", + name: "isPaused", + inputs: [], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "isSpecialRelayingEnabled", + inputs: [ + { + name: "chainId", + type: "uint16", + internalType: "uint16", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "isVAAConsumed", + inputs: [ + { + name: "hash", + type: "bytes32", + internalType: "bytes32", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "isWormholeEvmChain", + inputs: [ + { + name: "chainId", + type: "uint16", + internalType: "uint16", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "isWormholeRelayingEnabled", + inputs: [ + { + name: "chainId", + type: "uint16", + internalType: "uint16", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "migrate", + inputs: [], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "nttManager", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "nttManagerToken", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "owner", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "parseWormholeTransceiverInstruction", + inputs: [ + { + name: "encoded", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "instruction", + type: "tuple", + internalType: + "struct IWormholeTransceiver.WormholeTransceiverInstruction", + components: [ + { + name: "shouldSkipRelayerSend", + type: "bool", + internalType: "bool", + }, + ], + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "pauser", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "quoteDeliveryPrice", + inputs: [ + { + name: "targetChain", + type: "uint16", + internalType: "uint16", + }, + { + name: "instruction", + type: "tuple", + internalType: "struct TransceiverStructs.TransceiverInstruction", + components: [ + { + name: "index", + type: "uint8", + internalType: "uint8", + }, + { + name: "payload", + type: "bytes", + internalType: "bytes", + }, + ], + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "receiveMessage", + inputs: [ + { + name: "encodedMessage", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "receiveWormholeMessages", + inputs: [ + { + name: "payload", + type: "bytes", + internalType: "bytes", + }, + { + name: "additionalMessages", + type: "bytes[]", + internalType: "bytes[]", + }, + { + name: "sourceAddress", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "sourceChain", + type: "uint16", + internalType: "uint16", + }, + { + name: "deliveryHash", + type: "bytes32", + internalType: "bytes32", + }, + ], + outputs: [], + stateMutability: "payable", + }, + { + type: "function", + name: "sendMessage", + inputs: [ + { + name: "recipientChain", + type: "uint16", + internalType: "uint16", + }, + { + name: "instruction", + type: "tuple", + internalType: "struct TransceiverStructs.TransceiverInstruction", + components: [ + { + name: "index", + type: "uint8", + internalType: "uint8", + }, + { + name: "payload", + type: "bytes", + internalType: "bytes", + }, + ], + }, + { + name: "nttManagerMessage", + type: "bytes", + internalType: "bytes", + }, + { + name: "recipientNttManagerAddress", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "refundAddress", + type: "bytes32", + internalType: "bytes32", + }, + ], + outputs: [], + stateMutability: "payable", + }, + { + type: "function", + name: "setIsSpecialRelayingEnabled", + inputs: [ + { + name: "chainId", + type: "uint16", + internalType: "uint16", + }, + { + name: "isEnabled", + type: "bool", + internalType: "bool", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setIsWormholeEvmChain", + inputs: [ + { + name: "chainId", + type: "uint16", + internalType: "uint16", + }, + { + name: "isEvm", + type: "bool", + internalType: "bool", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setIsWormholeRelayingEnabled", + inputs: [ + { + name: "chainId", + type: "uint16", + internalType: "uint16", + }, + { + name: "isEnabled", + type: "bool", + internalType: "bool", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setWormholePeer", + inputs: [ + { + name: "peerChainId", + type: "uint16", + internalType: "uint16", + }, + { + name: "peerContract", + type: "bytes32", + internalType: "bytes32", + }, + ], + outputs: [], + stateMutability: "payable", + }, + { + type: "function", + name: "specialRelayer", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "contract ISpecialRelayer", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "transferOwnership", + inputs: [ + { + name: "newOwner", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "transferPauserCapability", + inputs: [ + { + name: "newPauser", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "transferTransceiverOwnership", + inputs: [ + { + name: "newOwner", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "upgrade", + inputs: [ + { + name: "newImplementation", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "wormhole", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "contract IWormhole", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "wormholeRelayer", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "contract IWormholeRelayer", + }, + ], + stateMutability: "view", + }, + { + type: "event", + name: "AdminChanged", + inputs: [ + { + name: "previousAdmin", + type: "address", + indexed: false, + internalType: "address", + }, + { + name: "newAdmin", + type: "address", + indexed: false, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "BeaconUpgraded", + inputs: [ + { + name: "beacon", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "Initialized", + inputs: [ + { + name: "version", + type: "uint64", + indexed: false, + internalType: "uint64", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "NotPaused", + inputs: [ + { + name: "notPaused", + type: "bool", + indexed: false, + internalType: "bool", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "OwnershipTransferred", + inputs: [ + { + name: "previousOwner", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "newOwner", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "Paused", + inputs: [ + { + name: "paused", + type: "bool", + indexed: false, + internalType: "bool", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "PauserTransferred", + inputs: [ + { + name: "oldPauser", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "newPauser", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "ReceivedMessage", + inputs: [ + { + name: "digest", + type: "bytes32", + indexed: false, + internalType: "bytes32", + }, + { + name: "emitterChainId", + type: "uint16", + indexed: false, + internalType: "uint16", + }, + { + name: "emitterAddress", + type: "bytes32", + indexed: false, + internalType: "bytes32", + }, + { + name: "sequence", + type: "uint64", + indexed: false, + internalType: "uint64", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "ReceivedRelayedMessage", + inputs: [ + { + name: "digest", + type: "bytes32", + indexed: false, + internalType: "bytes32", + }, + { + name: "emitterChainId", + type: "uint16", + indexed: false, + internalType: "uint16", + }, + { + name: "emitterAddress", + type: "bytes32", + indexed: false, + internalType: "bytes32", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "RelayingInfo", + inputs: [ + { + name: "relayingType", + type: "uint8", + indexed: false, + internalType: "uint8", + }, + { + name: "refundAddress", + type: "bytes32", + indexed: false, + internalType: "bytes32", + }, + { + name: "deliveryPayment", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SendTransceiverMessage", + inputs: [ + { + name: "recipientChain", + type: "uint16", + indexed: false, + internalType: "uint16", + }, + { + name: "message", + type: "tuple", + indexed: false, + internalType: "struct TransceiverStructs.TransceiverMessage", + components: [ + { + name: "sourceNttManagerAddress", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "recipientNttManagerAddress", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "nttManagerPayload", + type: "bytes", + internalType: "bytes", + }, + { + name: "transceiverPayload", + type: "bytes", + internalType: "bytes", + }, + ], + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SetIsSpecialRelayingEnabled", + inputs: [ + { + name: "chainId", + type: "uint16", + indexed: false, + internalType: "uint16", + }, + { + name: "isRelayingEnabled", + type: "bool", + indexed: false, + internalType: "bool", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SetIsWormholeEvmChain", + inputs: [ + { + name: "chainId", + type: "uint16", + indexed: false, + internalType: "uint16", + }, + { + name: "isEvm", + type: "bool", + indexed: false, + internalType: "bool", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SetIsWormholeRelayingEnabled", + inputs: [ + { + name: "chainId", + type: "uint16", + indexed: false, + internalType: "uint16", + }, + { + name: "isRelayingEnabled", + type: "bool", + indexed: false, + internalType: "bool", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SetWormholePeer", + inputs: [ + { + name: "chainId", + type: "uint16", + indexed: false, + internalType: "uint16", + }, + { + name: "peerContract", + type: "bytes32", + indexed: false, + internalType: "bytes32", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "Upgraded", + inputs: [ + { + name: "implementation", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "error", + name: "CallerNotNttManager", + inputs: [ + { + name: "caller", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "CallerNotRelayer", + inputs: [ + { + name: "caller", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "CannotRenounceTransceiverOwnership", + inputs: [ + { + name: "currentOwner", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "CannotTransferTransceiverOwnership", + inputs: [ + { + name: "currentOwner", + type: "address", + internalType: "address", + }, + { + name: "newOwner", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "InvalidBoolVal", + inputs: [ + { + name: "val", + type: "uint8", + internalType: "uint8", + }, + ], + }, + { + type: "error", + name: "InvalidBoolValue", + inputs: [ + { + name: "value", + type: "uint256", + internalType: "BooleanFlag", + }, + ], + }, + { + type: "error", + name: "InvalidFork", + inputs: [ + { + name: "evmChainId", + type: "uint256", + internalType: "uint256", + }, + { + name: "blockChainId", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + type: "error", + name: "InvalidInitialization", + inputs: [], + }, + { + type: "error", + name: "InvalidPauser", + inputs: [ + { + name: "account", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "InvalidRelayingConfig", + inputs: [ + { + name: "chainId", + type: "uint16", + internalType: "uint16", + }, + ], + }, + { + type: "error", + name: "InvalidVaa", + inputs: [ + { + name: "reason", + type: "string", + internalType: "string", + }, + ], + }, + { + type: "error", + name: "InvalidWormholeChainIdZero", + inputs: [], + }, + { + type: "error", + name: "InvalidWormholePeer", + inputs: [ + { + name: "chainId", + type: "uint16", + internalType: "uint16", + }, + { + name: "peerAddress", + type: "bytes32", + internalType: "bytes32", + }, + ], + }, + { + type: "error", + name: "InvalidWormholePeerZeroAddress", + inputs: [], + }, + { + type: "error", + name: "LengthMismatch", + inputs: [ + { + name: "encodedLength", + type: "uint256", + internalType: "uint256", + }, + { + name: "expectedLength", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + type: "error", + name: "NotAnEvmAddress", + inputs: [ + { + name: "", + type: "bytes32", + internalType: "bytes32", + }, + ], + }, + { + type: "error", + name: "NotInitializing", + inputs: [], + }, + { + type: "error", + name: "NotMigrating", + inputs: [], + }, + { + type: "error", + name: "OnlyDelegateCall", + inputs: [], + }, + { + type: "error", + name: "OwnableInvalidOwner", + inputs: [ + { + name: "owner", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "OwnableUnauthorizedAccount", + inputs: [ + { + name: "account", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "PeerAlreadySet", + inputs: [ + { + name: "chainId", + type: "uint16", + internalType: "uint16", + }, + { + name: "peerAddress", + type: "bytes32", + internalType: "bytes32", + }, + ], + }, + { + type: "error", + name: "ReentrancyGuardReentrantCall", + inputs: [], + }, + { + type: "error", + name: "RequireContractIsNotPaused", + inputs: [], + }, + { + type: "error", + name: "RequireContractIsPaused", + inputs: [], + }, + { + type: "error", + name: "TransferAlreadyCompleted", + inputs: [ + { + name: "vaaHash", + type: "bytes32", + internalType: "bytes32", + }, + ], + }, + { + type: "error", + name: "UnexpectedAdditionalMessages", + inputs: [], + }, + { + type: "error", + name: "UnexpectedDeployer", + inputs: [ + { + name: "deployer", + type: "address", + internalType: "address", + }, + { + name: "caller", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "UnexpectedRecipientNttManagerAddress", + inputs: [ + { + name: "recipientNttManagerAddress", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "expectedRecipientNttManagerAddress", + type: "bytes32", + internalType: "bytes32", + }, + ], + }, +] as const; + +const _bytecode = + "0x6101c06040818152346200031d5760c08262003742803803809162000025828562000322565b8339810103126200031d576200003b826200035c565b906020906200004c8285016200035c565b926200005a8286016200035c565b62000068606087016200035c565b9160808701519660ff881688036200031d5760a00151947ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0080549060ff82881c166200030c5782906001600160401b03906002600160401b031984831601620002c9575b50505050306080528160a052845190637e062a3560e11b8252808260048160018060a01b038097165afa908115620002be576000916200027f575b50905060c0523360e0528061012096168652806101409216825261016092168252610180924684526101009687526101a094855251946133d096876200037288396080518761313b015260a051878181610e100152818161154d015281816118d00152818161205501528181612204015281816128e00152612ae4015260c051878181610e9b01528181611c93015281816122560152818161268d0152612d7c015260e05187610d1801525186818161076e01528181610f4d0152818161127401528181611bfe01528181611df1015261239b01525185818161020801528181610c1501528181610f7a015281816112a001528181611ba601528181611e1e015281816122a601528181612e0201528181612ee20152612f800152518481816107a70152818161163601528181611a4a015281816122f60152612cc5015251838181610a7501528181611c3c015281816123460152612db90152518261024c0152518181816106ac01528181611a150152612c9a0152f35b82813d8311620002b6575b62000296818362000322565b81010312620002b35750620002ab906200035c565b803862000107565b80fd5b503d6200028a565b86513d6000823e3d90fd5b6001600160401b0319909316811790925586519182527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d291a138818180620000cc565b865163f92ee8a960e01b8152600490fd5b600080fd5b601f909101601f19168101906001600160401b038211908210176200034657604052565b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b03821682036200031d5756fe6080604081815260048036101561001557600080fd5b600092833560e01c908163036de8af146125ab575080630900f010146120845780630b4a1e89146113db57806324fb21db14612040578063320d0d8e14611ffd57806348b330d614611fb75780634b5b05051461183f5780634b795b211461179e578063529dca321461159457806358f709ba14611525578063657b3b2f1461148457806366152efc14611423578063689f90c3146113e0578063694977d7146113db5780637ab564031461118057806380eb3239146111445780638129fc1c14610c8957806381e8ec7f14610c4457806384acd1bb14610c005780638da5cb5b14610bca5780638fd3ab8014610aa457806390ea542814610a60578063935dec0714610a1e57806396dddc63146109695780639fd0506d14610921578063a0926b2a146108d5578063b187bd2614610894578063b5634c7314610847578063bc7f6d3714610804578063d8d28418146107d6578063da25b72514610792578063e8dfd50814610754578063f2fde38b1461071f578063f48066a8146106d3578063f68016b7146106945763f953cec7146101af57600080fd5b34610690576020908160031936011261068c578035906001600160401b0385818411610689576101e5610204943690850161279e565b86518095819263607ec5ef60e11b835288878401526024830190612887565b03817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa801561067f5786938790889261047a575b501561045757507f000000000000000000000000000000000000000000000000000000000000000046810361043b57506060830161ffff91828251166000526000805160206132bb833981519152865286600020546080860190815180910361040a575061014086016102d281516000526000805160206132db83398151915260205260ff6040600020541690565b6103f157927ff6fc529540981400dc64edf649eb5e2e0eb5812a27f8c81bac2c1d317e71a5f0608060e0948b8a8e9996896103336103849d9b516000526000805160206132db8339815191526020526040600020600160ff19825416179055565b519360a08989511692519301511692519384528d8401528d8301526060820152a1511694015190610362612943565b5061036b612969565b508651630453806b60e11b815293849283928301612ac2565b038173__$93083e246e55d56d98f3df2872cd16bfd0$__5af49283156103e7576103be9450859186946103c1575b50815191015191612ae1565b80f35b9093506103e091503d8087833e6103d88183612762565b810190612a44565b92386103b2565b84513d87823e3d90fd5b518851632d30ec0360e21b815280870191909152602490fd5b83518951633cd8e72b60e11b815290861661ffff1687820190815260208101929092529081900360400190fd5b0390fd5b826044918751916377d879fb60e01b8352820152466024820152fd5b8551634771719b60e11b8152808401869052908190610437906024830190612887565b945050503d8087853e61048d8185612762565b8301606090818582031261067b5784518381116105ff578501610160928382840312610603578851938401848110868211176106665789526104ce82613053565b84526104db888301613061565b888501526104ea898301613061565b898501528082015161ffff8116810361066257818501526080808301518186015261051760a08401612feb565b60a086015261052860c08401613053565b60c086015260e083015186811161065e57846105459185016129c1565b60e0860152610100610558818501613061565b90860152610120908184015187811161065a57840185601f8201121561065a5780518c946105916105888361284d565b96519687612762565b8186528c8087019260071b84010192888411610656578d01915b83831061060757505050505084015261014080910151908301526105d0868601613072565b94878101519084821161060357019080601f830112156105ff5781516105f792880161298a565b909338610243565b8880fd5b8980fd5b84838a0312610656578d8f9182879351906106218261272c565b865182528387015184830152610638818801613053565b90820152610647858701613053565b858201528152019201916105ab565b8f80fd5b8c80fd5b8b80fd5b8a80fd5b604187634e487b7160e01b6000525260246000fd5b8780fd5b85513d88823e3d90fd5b80fd5b8380fd5b8280fd5b5050346106cf57816003193601126106cf57602090517f00000000000000000000000000000000000000000000000000000000000000008152f35b5080fd5b5050346106cf5760203660031901126106cf5760209061ffff6106f46126bc565b166000526000805160206132fb833981519152825261071681600020546130f7565b90519015158152f35b8382346106cf5760203660031901126106cf57356001600160a01b03811681036106cf576103be9061074f61320b565b6131da565b5050346106cf57816003193601126106cf576020905160ff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b5050346106cf57816003193601126106cf57517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b5050346106cf57816003193601126106cf576020906107f36128cb565b90516001600160a01b039091168152f35b5050346106cf5760203660031901126106cf5760209061ffff6108256126bc565b1660005260008051602061329b833981519152825261071681600020546130f7565b50346106905781600319360112610690576108606126bc565b92602435906001600160401b03821161068957509261088761088d926020953691016127e5565b90612c24565b9051908152f35b5050346106cf57816003193601126106cf5760209060027f64bacf405c5d7f563d3ba5252584a52c37e4fee380fd825b10666c27b825802254149051908152f35b5050346106cf57816003193601126106cf57805161091d916108f682612747565b6008825267776f726d686f6c6560c01b602083015251918291602083526020830190612887565b0390f35b5050346106cf57816003193601126106cf577fbfa91572ce1e5fe8776a160d3b1f862e83f5ee2c080a7423b4761602a3ad12495490516001600160a01b039091168152602090f35b508290346106cf57826003193601126106cf576109846126bc565b61098c61283e565b9161099561320b565b61ffff8216908115610a1057507f4add57d97a7bf5035340ea1212aeeb3d4d3887eb1faf3821a8224c3a6956a10c9394610a0a916109d285613129565b906000526000805160206132fb8339815191526020528160002055519283928390929160209061ffff60408401951683521515910152565b0390a180f35b8551630f7662c960e21b8152fd5b5050346106cf5760203660031901126106cf5760209061ffff610a3f6126bc565b166000526000805160206132bb833981519152825280600020549051908152f35b5050346106cf57816003193601126106cf57517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b509034610690578260031936011261069057610abe613138565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0080546001600160401b038082166001810190828211610bb75760ff84871c16908115610baa575b50610b9a57169360ff7f7487ca88d037ca20519908b1ee7556206bef53bce0226a348750cb9d4f688e4e541615610b8c575068ffffffffffffffffff19168317680100000000000000001768ff000000000000000019169055519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602090a180f35b8351632866815360e11b8152fd5b845163f92ee8a960e01b81528690fd5b9050828216111538610b06565b634e487b7160e01b885260118752602488fd5b5050346106cf57816003193601126106cf5760008051602061333b8339815191525490516001600160a01b039091168152602090f35b5050346106cf57816003193601126106cf57517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b5050346106cf57816003193601126106cf57805161091d91610c6582612747565b60058252640312e312e360dc1b602083015251918291602083526020830190612887565b508260031936011261069057610c9d613138565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a009182549160ff83831c1615906001600160401b03938481168015908161113c575b6001149081611132575b159081611129575b5061111a5767ffffffffffffffff1981166001178655826110fb575b506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116338190036110df5750610d4a613199565b610d52613199565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055610dfe610d816128cb565b610d89613199565b610d91613199565b610d99613199565b60017f64bacf405c5d7f563d3ba5252584a52c37e4fee380fd825b10666c27b8258022557fbfa91572ce1e5fe8776a160d3b1f862e83f5ee2c080a7423b4761602a3ad124980546001600160a01b03191633179055610df6613199565b61074f613199565b8351634b4fd03b60e01b8152602095907f0000000000000000000000000000000000000000000000000000000000000000831687828681845afa9182156110d5578a9261109e575b508651631dcbf42b60e11b81529188838781855afa928315611094578b9361105d575b5087519360a0850190811185821017610666578852639c23bd3b60e01b845288840191825260ff9081168489019081527f00000000000000000000000000000000000000000000000000000000000000008616606086019081529382166080860190815289516301529f6160e21b815295516001600160e01b031916888701529251602486015251811660448501529151606484015251166084820152878160a48173__$93083e246e55d56d98f3df2872cd16bfd0$__5af49081156110535791610f74939187938a91611031575b5086518095819482936358cd21bf60e11b84527f0000000000000000000000000000000000000000000000000000000000000000918401612fff565b039134907f0000000000000000000000000000000000000000000000000000000000000000165af1801561102757610fef575b50610fb0578380f35b7fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29268ff00000000000000001981541690555160018152a13880808380f35b8381813d8311611020575b6110048183612762565b8101031261101c5761101590612feb565b5038610fa7565b8580fd5b503d610ffa565b83513d88823e3d90fd5b61104d91503d808c833e6110458183612762565b81019061307f565b38610f38565b85513d8a823e3d90fd5b9092508881813d831161108d575b6110758183612762565b810103126106625761108690613053565b9138610e69565b503d61106b565b88513d8d823e3d90fd5b9091508781813d83116110ce575b6110b68183612762565b81010312610603576110c790613053565b9038610e46565b503d6110ac565b87513d8c823e3d90fd5b82604491865191636345072160e11b8352820152336024820152fd5b68ffffffffffffffffff19166801000000000000000117855538610d0d565b50825163f92ee8a960e01b8152fd5b90501538610cf1565b303b159150610ce9565b849150610cdf565b5091346106895760203660031901126106895750610716602092356000526000805160206132db83398151915260205260ff6040600020541690565b5081600319360112610690576111946126bc565b602435916111a061320b565b61ffff8083169081156113cb5784156113bb57816000526000805160206132bb8339815191529160209280845287600020548061139257508160005283528587600020558651916111f083612711565b630c7e33e160e11b8352838301918252878301878152885163077650fb60e51b815293516001600160e01b031916868501529151166024830152516044820152868160648173__$93083e246e55d56d98f3df2872cd16bfd0$__5af49283156113885761129b938392899161136e575b5087516358cd21bf60e11b815294859283927f0000000000000000000000000000000000000000000000000000000000000000918401612fff565b0381347f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165af1801561067f57611312575b5050915161ffff909216825260208201527fa559263ee060c7a2560843b3a064ff0376c9753ae3e2449b595a3b615d326466908060408101610a0a565b81813d8311611367575b6113268183612762565b81010312611363577fa559263ee060c7a2560843b3a064ff0376c9753ae3e2449b595a3b615d3264669361135c610a0a92612feb565b50936112d5565b8480fd5b503d61131c565b61138291503d808b833e6110458183612762565b38611260565b86513d89823e3d90fd5b885163b55eeae960e01b815261ffff881681880190815260208101929092529081906040010390fd5b855163137063ef60e11b81528390fd5b8551630f7662c960e21b81528390fd5b612677565b5050346106cf57816003193601126106cf5760209060ff7f5443fea4dc453d96b81ce55b62e11a4094cc4cbb8a360956a7253cfdb42506cb541690519015158152f35b5091346106895760203660031901126106895750805191611443836126f6565b35908115159182810361147f5761091d935280519160f81b60208301526001825261146d82612747565b51918291602083526020830190612887565b600080fd5b508290346106cf57826003193601126106cf5761149f6126bc565b6114a761283e565b916114b061320b565b61ffff8216908115610a1057507f528b18a533e892b5401d1fb63597275df9d2bb45b13e7695c3147cd07b9746c39394610a0a916114ed85613129565b9060005260008051602061331b8339815191526020528160002055519283928390929160209061ffff60408401951683521515910152565b5034610690576020366003190112610690578035916001600160a01b038084168403611363577f000000000000000000000000000000000000000000000000000000000000000016330361157d57836103be84613244565b60249250519063c5aa615360e01b82523390820152fd5b5060a0366003190112610690576001600160401b038135818111611363576115bf903690840161279e565b60249283359383851161179a573660238601121561179a5784820135936115e58561284d565b946115f288519687612762565b808652602096838888019260051b8201019236841161066257848201925b8484106117745750505050506044356064359461ffff86169081870361147f57608435937f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316330361176157826000526000805160206132bb8339815191528952838a600020540361173a57848b526000805160206132db833981519152895260ff8a8c20541661172657506116cf846000526000805160206132db8339815191526020526040600020600160ff19825416179055565b5161171657606061038495938a95937ff557dbbb087662f52c815f6c7ee350628a37a51eae9608ff840d996b65f87475938b519283528a8301528a820152a1610362612943565b875163c504ea2960e01b81528490fd5b8951632d30ec0360e21b8152808701869052fd5b8951633cd8e72b60e11b815261ffff89168188019081526020810186905281906040010390fd5b8951631c26958960e01b81523381880152fd5b833582811161065a578a9161178f839289369188010161279e565b815201930192611610565b8680fd5b508290346106cf57826003193601126106cf576117b96126bc565b6117c161283e565b916117ca61320b565b61ffff8216908115610a1057507f0fe301480713b2c2072ee91b3bcfcbf2c0014f0447c89046f020f0f80727003c9394610a0a9161180785613129565b9060005260008051602061329b8339815191526020528160002055519283928390929160209061ffff60408401951683521515910152565b509060031960a03682011261068c576118566126bc565b9060249283356001600160401b039081811161067b5761187990369088016127e5565b906044358181116105ff57611891903690890161279e565b90608435977f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00976002895414611fa857600289556001600160a01b03937f000000000000000000000000000000000000000000000000000000000000000085163303611f9257908b61194b819361195a8a519b61190d8d6126f6565b848d528b516304616c8f60e21b81526309945ff160e41b89820152338782015260648035604483015260a0908201529c8d94859460a4860190612887565b91848303016084850152612887565b038173__$93083e246e55d56d98f3df2872cd16bfd0$__5af4938415611f885782988395611f36575b50611992602080980151612ba9565b80511580611f27575b15611b7e575050928a92859283898997611a0d61ffff8f16968792836000526000805160206132bb8339815191528c526119e16119db8660002054613027565b9b613027565b94519c8d9b8c9a8b9a6312d729bd60e21b8c528b0152169088015260e0604488015260e4870190612887565b9360648601527f0000000000000000000000000000000000000000000000000000000000000000608486015260a48501521660c4830152039134907f0000000000000000000000000000000000000000000000000000000000000000165af18015611b7457611b03575b5061ffff926060611ae884611afc9460008051602061337b8339815191528460019c60008051602061335b8339815191529b99519060008252848201523485820152a15b815197889716875281818801528451828801528401518387015283015160808087015260c0860190612887565b910151838203603f190160a0850152612887565b0390a15580f35b9391928185813d8311611b6d575b611b1b8183612762565b8101031261067b576060611ae861ffff95611afc9460008051602061337b8339815191528460019c611b5b60008051602061335b8339815191529c612feb565b509c5050509450949650505092611a77565b503d611b11565b83513d8a823e3d90fd5b919394959250959697989a50511580611efb575b15611dd1578651631a90a21960e01b8152937f000000000000000000000000000000000000000000000000000000000000000082169087868681855afa958d8715611dc657908993929197611d93575b50869291611c26918b519889809481936358cd21bf60e11b83527f0000000000000000000000000000000000000000000000000000000000000000908c8401612fff565b03925af1948515611d89578c95611d52575b50817f00000000000000000000000000000000000000000000000000000000000000001690340390348211611d3e5790818d9796959493923b1561067b578c96889660849561ffff8d519a8b998a98630b5624e160e11b8a527f0000000000000000000000000000000000000000000000000000000000000000169089015216908601528760448601521660648401525af18015611d3457611d1c575b5060008051602061335b833981519152936060611ae8856001999560008051602061337b83398151915284611afc9761ffff9a51908e8252848201523485820152a1611abb565b611d28909692966126cd565b61101c57938538611cd5565b84513d84823e3d90fd5b83601186634e487b7160e01b600052526000fd5b9094508681813d8311611d82575b611d6a8183612762565b8101031261065e57611d7b90612feb565b9338611c38565b503d611d60565b88513d8e823e3d90fd5b9196509181813d8111611dbf575b611dab8183612762565b8101031261147f5751948791611c26611be2565b503d611da1565b8a51903d90823e3d90fd5b9050611e189350849286999799518095819482936358cd21bf60e11b84527f0000000000000000000000000000000000000000000000000000000000000000918401612fff565b039134907f0000000000000000000000000000000000000000000000000000000000000000165af18015611ef157611e93575b5091611afc6001956060611ae88560008051602061335b8339815191529760008051602061337b833981519152848d61ffff9a519060028252848201523485820152a1611abb565b9181838195933d8311611eea575b611eab8183612762565b8101031261179a576001956060611ae8611afc9360008051602061335b83398151915297611edb61ffff98612feb565b50959750955050509550611e4b565b503d611ea1565b83513d89823e3d90fd5b5061ffff8a1660005260008051602061329b8339815191528652611f2287600020546130f7565b611b92565b50611f318b6130a4565b61199b565b985093503d80838a3e611f49818a612762565b88019787818a031261069057805185811161068c5789611f6a9183016129db565b98602082015186811161136357611f8192016129c1565b9338611983565b87513d84823e3d90fd5b509085519063c5aa615360e01b82523390820152fd5b508451633ee5aeb560e01b8152fd5b509134610689576020366003190112610689578235906001600160401b0382116106895750611fee602093611ff39236910161279e565b612ba9565b9051905115158152f35b5050346106cf5760203660031901126106cf5760209061ffff61201e6126bc565b1660005260008051602061331b833981519152825261071681600020546130f7565b5050346106cf57816003193601126106cf57517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b509034610690576020918260031936011261068c576001600160a01b039181358381169081810361179a576120b761320b565b6120bf613138565b3b15612552577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b031916821790557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b8680a27f7487ca88d037ca20519908b1ee7556206bef53bce0226a348750cb9d4f688e4e9384549361214c60ff86161561317c565b60ff199485166001178655303b1561179a57825163011fa75760e71b81528781868183305af180156124465761253f575b50825163689f90c360e01b815282818681305afa90811561244657889161250a575b50156121d9575b505050507f5443fea4dc453d96b81ce55b62e11a4094cc4cbb8a360956a7253cfdb42506cb818154169055815416905580f35b82516324fb21db60e01b815282818681305afa908115612446579061222b9189916124ed575b5082167f000000000000000000000000000000000000000000000000000000000000000083161461317c565b8251630b4a1e8960e01b815282818681305afa908115612446579061227d9189916124c0575b5082167f000000000000000000000000000000000000000000000000000000000000000083161461317c565b82516384acd1bb60e01b815282818681305afa8015612446578890612488575b6122cd915082167f000000000000000000000000000000000000000000000000000000000000000083161461317c565b825163da25b72560e01b815282818681305afa8015612446578890612450575b61231d915082167f000000000000000000000000000000000000000000000000000000000000000083161461317c565b825163121d4a8560e31b815282818681305afa90811561244657889161240c575b508161236e927f00000000000000000000000000000000000000000000000000000000000000001691161461317c565b8082518094631d1bfaa160e31b825281305afa918215612403575085916123cc575b506123c3915060ff807f00000000000000000000000000000000000000000000000000000000000000001691161461317c565b388080806121a6565b905081813d83116123fc575b6123e28183612762565b8101031261068c576123f66123c391613053565b38612390565b503d6123d8565b513d87823e3d90fd5b90508281813d831161243f575b6124238183612762565b8101031261067b575190808216820361067b579061236e61233e565b503d612419565b84513d8a823e3d90fd5b508281813d8311612481575b6124668183612762565b8101031261067b5751818116810361067b5761231d906122ed565b503d61245c565b508281813d83116124b9575b61249e8183612762565b8101031261067b5751818116810361067b576122cd9061229d565b503d612494565b6124e09150843d86116124e6575b6124d88183612762565b8101906128ac565b38612251565b503d6124ce565b6125049150843d86116124e6576124d88183612762565b386121ff565b90508281813d8311612538575b6125218183612762565b8101031261067b5761253290613072565b3861219f565b503d612517565b61254b909791976126cd565b953861217d565b815162461bcd60e51b8152808401869052602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608490fd5b828591346106905760203660031901126106905781356001600160a01b038181169391849003611363578060008051602061333b8339815191525416927fbfa91572ce1e5fe8776a160d3b1f862e83f5ee2c080a7423b4761602a3ad12499283549283169433861415908161266c575b506126575750506001600160a01b031916831790557f51c4874e0f23f262e04a38c51751336dde72126d67f53eb672aaff02996b3ef68380a380f35b63e2a08e5d60e01b8252339082015260249150fd5b90503314158861261b565b3461147f57600036600319011261147f576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b6004359061ffff8216820361147f57565b6001600160401b0381116126e057604052565b634e487b7160e01b600052604160045260246000fd5b602081019081106001600160401b038211176126e057604052565b606081019081106001600160401b038211176126e057604052565b608081019081106001600160401b038211176126e057604052565b604081019081106001600160401b038211176126e057604052565b90601f801991011681019081106001600160401b038211176126e057604052565b6001600160401b0381116126e057601f01601f191660200190565b81601f8201121561147f578035906127b582612783565b926127c36040519485612762565b8284526020838301011161147f57816000926020809301838601378301015290565b91909160408184031261147f5760408051916001600160401b03918301828111848210176126e0576040528294813560ff8116810361147f578452602082013592831161147f57602092612839920161279e565b910152565b60243590811515820361147f57565b6001600160401b0381116126e05760051b60200190565b60005b8381106128775750506000910152565b8181015183820152602001612867565b906020916128a081518092818552858086019101612864565b601f01601f1916010190565b9081602091031261147f57516001600160a01b038116810361147f5790565b604051638da5cb5b60e01b81526020816004817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa9081156129375760009161291c575090565b612934915060203d81116124e6576124d88183612762565b90565b6040513d6000823e3d90fd5b604051906129508261272c565b6060808360008152600060208201528160408201520152565b6040519061297682612711565b606060408360008152600060208201520152565b9092919261299781612783565b916129a56040519384612762565b82948284528282011161147f5760206129bf930190612864565b565b9080601f8301121561147f5781516129349260200161298a565b919060808382031261147f57604051906129f48261272c565b819380518352602081015160208401526040810151916001600160401b039283811161147f5781612a269184016129c1565b6040850152606082015192831161147f5760609261283992016129c1565b919060408382031261147f578251906001600160401b039182811161147f5781612a6f9186016129db565b9360208101519083821161147f57019060608282031261147f5760405192612a9684612711565b8251845260208301516020850152604083015190811161147f57612aba92016129c1565b604082015290565b6309945ff160e41b815260406020820181905261293492910190612887565b917f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690818103612b8b5750803b1561147f5761ffff60008094612b71604080519889978896879563275e091560e21b875216600486015260248501526060604485015280516064850152602081015160848501520151606060a484015260c4830190612887565b03925af1801561293757612b825750565b6129bf906126cd565b60449250604051916339dee99160e11b835260048301526024820152fd5b9060405191612bb7836126f6565b6000835282815115612c1f5750600181015160fe8116612c035760ff16151583525160018103612be45750565b604490604051906355c5b3e360e11b8252600482015260016024820152fd5b60405163f7a37b0760e01b815260ff9091166004820152602490fd5b925050565b90612c33602080920151612ba9565b51612f6a5761ffff82169060009082825260008051602061331b8339815191528152604093612c64858420546130f7565b80612f43575b612f2b57612c77906130a4565b15612d3e5750825163c23ee3c360e01b81526004810192909252602482018190527f0000000000000000000000000000000000000000000000000000000000000000604483015282826064817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa928315612d34578193612d03575b50505090565b9091809350813d8311612d2d575b612d1b8183612762565b81010312610689575051388080612cfd565b503d612d11565b51903d90823e3d90fd5b82829394925260008051602061329b8339815191528152612d61828420546130f7565b15612ec957815163209d173960e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301526024820195909552604481018490529381856064817f000000000000000000000000000000000000000000000000000000000000000085165afa948515612ebc578495612e8d575b509080600492845193848092631a90a21960e01b82527f0000000000000000000000000000000000000000000000000000000000000000165afa928315612e8457508392612e56575b50508201809211612e42575090565b634e487b7160e01b81526011600452602490fd5b90809250813d8311612e7d575b612e6d8183612762565b810103126106cf57513880612e33565b503d612e63565b513d85823e3d90fd5b9094508181813d8311612eb5575b612ea58183612762565b8101031261068c57519381612dea565b503d612e9b565b50505051903d90823e3d90fd5b8151631a90a21960e01b815291935090919080836004817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa938415612f2057508193612d035750505090565b51913d9150823e3d90fd5b845163251268db60e21b815260048101859052602490fd5b508383526000805160206132fb8339815191528252612f64858420546130f7565b15612c6a565b604051631a90a21960e01b8152915080826004817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa90811561293757600091612fbf575b50905090565b82813d8311612fe4575b612fd38183612762565b810103126106895750518038612fb9565b503d612fc9565b51906001600160401b038216820361147f57565b9060ff61302060409295949560008552606060208601526060850190612887565b9416910152565b8060a01c61303b576001600160a01b031690565b6024906040519063033b960d60e41b82526004820152fd5b519060ff8216820361147f57565b519063ffffffff8216820361147f57565b5190811515820361147f57565b9060208282031261147f5781516001600160401b03811161147f5761293492016129c1565b61ffff168060005260008051602061331b8339815191526020526130cc6040600020546130f7565b90816130d6575090565b90506000526000805160206132fb8339815191526020526129346040600020545b8015613123576001811461311d576024906040519063b998bad560e01b82526004820152fd5b50600190565b50600090565b1561313357600190565b600090565b307f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03161461316a57565b604051633c64f99360e21b8152600490fd5b1561318357565b634e487b7160e01b600052600160045260246000fd5b60ff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460401c16156131c857565b604051631afcd79f60e31b8152600490fd5b6001600160a01b038116156131f2576129bf90613244565b604051631e4fbdf760e01b815260006004820152602490fd5b60008051602061333b833981519152546001600160a01b0316330361322c57565b60405163118cdaa760e01b8152336004820152602490fd5b60008051602061333b83398151915280546001600160a01b039283166001600160a01b0319821681179092559091167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a356fed4cbc7742a1e11dcc33209ac33862ef146cfcb6d7f860df12df42105dfedb1c948c66ef0992b4bcc14f2551075db9459fc23bf706abb76034f1c66c1ba2846845e6aacb3f16e5b01c8b072a0ab4c38e919266014a45db863ee64a4580fb3e7e2e79d2e5e46f62be2ac831294e423b664f30320fb9ebaefd78a978cafe07c0f8c16ee6ac6bf7a8d7c37112a9426e00852b215ac4f5c50536beb6c95f1ba47b4af9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930079376a0dc6cbfe6f6f8f89ad24c262a8c6233f8df181d3fe5abb2e2442e8c738c3192e083c87c556db539f071d8a298869f487e951327b5616a6f85ae3da958ea2646970667358221220e7f8de5dcf4021062dfa83d99b2cddf0b9c121c59fc85602525b3eab8b39510164736f6c63430008130033"; + +type WormholeTransceiverConstructorParams = + | [linkLibraryAddresses: WormholeTransceiverLibraryAddresses, signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: WormholeTransceiverConstructorParams +): xs is ConstructorParameters => { + return ( + typeof xs[0] === "string" || + (Array.isArray as (arg: any) => arg is readonly any[])(xs[0]) || + "_isInterface" in xs[0] + ); +}; + +export class WormholeTransceiver__factory extends ContractFactory { + constructor(...args: WormholeTransceiverConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + const [linkLibraryAddresses, signer] = args; + super( + _abi, + WormholeTransceiver__factory.linkBytecode(linkLibraryAddresses), + signer + ); + } + } + + static linkBytecode( + linkLibraryAddresses: WormholeTransceiverLibraryAddresses + ): string { + let linkedBytecode = _bytecode; + + linkedBytecode = linkedBytecode.replace( + new RegExp("__\\$93083e246e55d56d98f3df2872cd16bfd0\\$__", "g"), + linkLibraryAddresses[ + "src/libraries/TransceiverStructs.sol:TransceiverStructs" + ] + .replace(/^0x/, "") + .toLowerCase() + ); + + return linkedBytecode; + } + + override getDeployTransaction( + nttManager: AddressLike, + wormholeCoreBridge: AddressLike, + wormholeRelayerAddr: AddressLike, + specialRelayerAddr: AddressLike, + _consistencyLevel: BigNumberish, + _gasLimit: BigNumberish, + overrides?: NonPayableOverrides & { from?: string } + ): Promise { + return super.getDeployTransaction( + nttManager, + wormholeCoreBridge, + wormholeRelayerAddr, + specialRelayerAddr, + _consistencyLevel, + _gasLimit, + overrides || {} + ); + } + override deploy( + nttManager: AddressLike, + wormholeCoreBridge: AddressLike, + wormholeRelayerAddr: AddressLike, + specialRelayerAddr: AddressLike, + _consistencyLevel: BigNumberish, + _gasLimit: BigNumberish, + overrides?: NonPayableOverrides & { from?: string } + ) { + return super.deploy( + nttManager, + wormholeCoreBridge, + wormholeRelayerAddr, + specialRelayerAddr, + _consistencyLevel, + _gasLimit, + overrides || {} + ) as Promise< + WormholeTransceiver & { + deploymentTransaction(): ContractTransactionResponse; + } + >; + } + override connect( + runner: ContractRunner | null + ): WormholeTransceiver__factory { + return super.connect(runner) as WormholeTransceiver__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): WormholeTransceiverInterface { + return new Interface(_abi) as WormholeTransceiverInterface; + } + static connect( + address: string, + runner?: ContractRunner | null + ): WormholeTransceiver { + return new Contract( + address, + _abi, + runner + ) as unknown as WormholeTransceiver; + } +} + +export interface WormholeTransceiverLibraryAddresses { + ["src/libraries/TransceiverStructs.sol:TransceiverStructs"]: string; +} diff --git a/sdk/evm/src/ethers-contracts/1_1_0/factories/index.ts b/sdk/evm/src/ethers-contracts/1_1_0/factories/index.ts new file mode 100644 index 000000000..719b3f2b8 --- /dev/null +++ b/sdk/evm/src/ethers-contracts/1_1_0/factories/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { NttManager__factory } from "./NttManager__factory.js"; +export { WormholeTransceiver__factory } from "./WormholeTransceiver__factory.js"; diff --git a/sdk/evm/src/ethers-contracts/1_1_0/index.ts b/sdk/evm/src/ethers-contracts/1_1_0/index.ts new file mode 100644 index 000000000..48078a607 --- /dev/null +++ b/sdk/evm/src/ethers-contracts/1_1_0/index.ts @@ -0,0 +1,8 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { NttManager } from "./NttManager.js"; +export type { WormholeTransceiver } from "./WormholeTransceiver.js"; +export * as factories from "./factories/index.js"; +export { NttManager__factory } from "./factories/NttManager__factory.js"; +export { WormholeTransceiver__factory } from "./factories/WormholeTransceiver__factory.js"; diff --git a/sdk/evm/src/ethers-contracts/index.ts b/sdk/evm/src/ethers-contracts/index.ts index 3494cddff..2e32dc983 100644 --- a/sdk/evm/src/ethers-contracts/index.ts +++ b/sdk/evm/src/ethers-contracts/index.ts @@ -1,5 +1,6 @@ import * as __0_1_0 from "./0_1_0/index.js"; import * as __1_0_0 from "./1_0_0/index.js"; +import * as __1_1_0 from "./1_1_0/index.js"; const _0_1_0 = { NttManager: { @@ -19,4 +20,13 @@ const _1_0_0 = { }, }; -export { _0_1_0, _1_0_0 }; +const _1_1_0 = { + NttManager: { + connect: __1_1_0.NttManager__factory.connect, + }, + NttTransceiver: { + connect: __1_1_0.WormholeTransceiver__factory.connect, + }, +}; + +export { _0_1_0, _1_0_0, _1_1_0 }; diff --git a/sdk/evm/src/ntt.ts b/sdk/evm/src/ntt.ts index 547907e66..184bae4dc 100644 --- a/sdk/evm/src/ntt.ts +++ b/sdk/evm/src/ntt.ts @@ -29,7 +29,6 @@ import { } from "@wormhole-foundation/sdk-definitions-ntt"; import { Contract, type Provider, type TransactionRequest } from "ethers"; import { - AbiVersion, NttBindings, NttManagerBindings, NttTransceiverBindings, @@ -99,7 +98,7 @@ export class EvmNtt readonly chain: C, readonly provider: Provider, readonly contracts: Contracts & { ntt?: Ntt.Contracts }, - readonly abiVersion: AbiVersion = "default" + readonly version: string = "default" ) { if (!contracts.ntt) throw new Error("No Ntt Contracts provided"); @@ -111,7 +110,7 @@ export class EvmNtt this.tokenAddress = contracts.ntt.token; this.managerAddress = contracts.ntt.manager; - const abiBindings = loadAbiVersion(this.abiVersion); + const abiBindings = loadAbiVersion(this.version); this.manager = abiBindings.NttManager.connect( contracts.ntt.manager, @@ -146,7 +145,7 @@ export class EvmNtt const { emitterChain: chain, payload } = attestation as VAA<"Ntt:WormholeTransfer">; return this.manager.isMessageExecuted( - Ntt.messageDigest(chain, payload.nttManagerPayload) + Ntt.messageDigest(chain, payload["nttManagerPayload"]) ); } @@ -154,7 +153,7 @@ export class EvmNtt const { emitterChain: chain, payload } = attestation as VAA<"Ntt:WormholeTransfer">; return this.manager.isMessageApproved( - Ntt.messageDigest(chain, payload.nttManagerPayload) + Ntt.messageDigest(chain, payload["nttManagerPayload"]) ); } @@ -175,9 +174,7 @@ export class EvmNtt if (conf.network !== network) throw new Error(`Network mismatch: ${conf.network} != ${network}`); - const { ntt } = conf.contracts as { ntt: Ntt.Contracts }; - - const version = await EvmNtt._getVersion(ntt.manager, provider); + const version = await EvmNtt.getVersion(provider, conf.contracts); return new EvmNtt(network as N, chain, provider, conf.contracts, version); } @@ -192,13 +189,12 @@ export class EvmNtt return ixs; } - async getVersion(): Promise { - return EvmNtt._getVersion(this.managerAddress, this.provider); - } - - static async _getVersion(address: string, provider: Provider) { + static async getVersion( + provider: Provider, + contracts: Contracts & { ntt?: Ntt.Contracts } + ) { const contract = new Contract( - address, + contracts.ntt!.manager, ["function NTT_MANAGER_VERSION() public view returns (string)"], provider ); @@ -212,7 +208,7 @@ export class EvmNtt return abiVersion; } catch (e) { console.error( - `Failed to get NTT_MANAGER_VERSION from contract ${address}` + `Failed to get NTT_MANAGER_VERSION from contract ${contracts.ntt?.manager}` ); throw e; } diff --git a/sdk/evm/tsconfig.test.json b/sdk/evm/tsconfig.test.json index 14bc32fb4..55b1793db 100644 --- a/sdk/evm/tsconfig.test.json +++ b/sdk/evm/tsconfig.test.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.json", + "extends": "../../tsconfig.json", "include": ["src/**/*.ts"], "compilerOptions": { "module": "NodeNext", diff --git a/sdk/examples/.gitignore b/sdk/examples/.gitignore index 2eea525d8..41bb82d32 100644 --- a/sdk/examples/.gitignore +++ b/sdk/examples/.gitignore @@ -1 +1,2 @@ -.env \ No newline at end of file +.env +src/tilt.ts diff --git a/sdk/examples/package.json b/sdk/examples/package.json index f1b691c6c..8a0a56150 100644 --- a/sdk/examples/package.json +++ b/sdk/examples/package.json @@ -1,6 +1,6 @@ { "name": "@wormhole-foundation/sdk-examples-ntt", - "version": "0.0.1-beta.1", + "version": "0.0.1-beta.5", "repository": { "type": "git", "url": "git+https://github.com/wormhole-foundation/connect-sdk.git" @@ -31,17 +31,11 @@ "engines": { "node": ">=16" }, - "sideEffects": true, "scripts": { - "build:cjs": "tsc -p ./tsconfig.cjs.json && echo '{\"type\":\"commonjs\"}' > dist/cjs/package.json", - "build:esm": "tsc -p ./tsconfig.esm.json", - "build": "npm run build:esm && npm run build:cjs", - "route":"tsx src/route.ts", - "demo":"tsx src/index.ts", - "clean": "rm -rf ./dist" + "route": "tsx src/route.ts", + "demo": "tsx src/index.ts" }, "devDependencies": { - "@types/bn.js": "^5.1.5", "dotenv": "^16.4.5", "nock": "^13.3.3", "ts-jest": "^29.1.2", @@ -49,23 +43,10 @@ "tsx": "^4.7.2" }, "dependencies": { - "@wormhole-foundation/sdk": "0.5.3-beta.9", - "@wormhole-foundation/sdk-definitions-ntt": "0.0.1-beta.1", - "@wormhole-foundation/sdk-evm-ntt": "0.0.1-beta.1", - "@wormhole-foundation/sdk-solana-ntt": "0.0.1-beta.1", - "@wormhole-foundation/sdk-route-ntt": "0.0.1-beta.1" - }, - "type": "module", - "exports": { - ".": { - "import": { - "types": "./dist/esm/index.d.ts", - "default": "./dist/esm/index.js" - }, - "require": { - "types": "./dist/cjs/index.d.ts", - "default": "./dist/cjs/index.js" - } - } + "@wormhole-foundation/sdk": "0.6.5", + "@wormhole-foundation/sdk-definitions-ntt": "0.0.1-beta.5", + "@wormhole-foundation/sdk-evm-ntt": "0.0.1-beta.5", + "@wormhole-foundation/sdk-solana-ntt": "0.0.1-beta.5", + "@wormhole-foundation/sdk-route-ntt": "0.0.1-beta.5" } -} +} \ No newline at end of file diff --git a/sdk/examples/src/consts.ts b/sdk/examples/src/consts.ts index b904677ac..b0ddbcba7 100644 --- a/sdk/examples/src/consts.ts +++ b/sdk/examples/src/consts.ts @@ -1,7 +1,7 @@ import { Chain } from "@wormhole-foundation/sdk"; import { Ntt } from "@wormhole-foundation/sdk-definitions-ntt"; import { NttRoute } from "@wormhole-foundation/sdk-route-ntt"; -type NttContracts = { +export type NttContracts = { [key in Chain]?: Ntt.Contracts; }; @@ -48,6 +48,22 @@ export const TEST_NTT_TOKENS: NttContracts = { }, }; +export const TEST_NTT_SPL22_TOKENS: NttContracts = { + Sepolia: { + token: "0x3a84364d27ed3d16022da0f603f3e0f74826c707", + manager: "0x46475d067f7c2a388a7bb7fd5a9A4a68D7fA45c5", + transceiver: { + wormhole: "0x24cb9E1FEcaa40f07feBC0E32Ce16C0bb3ed6443", + }, + }, + Solana: { + token: "BAn1Zcr48bmaK5SmzBDjoju6csFe8AT6bot4ACBJvVwU", + manager: "NtTnpY76eiMYqYX9xkag2CSXk9cGi6hinMWbMLMDYUP", + transceiver: { wormhole: "NtTnpY76eiMYqYX9xkag2CSXk9cGi6hinMWbMLMDYUP" }, + quoter: "Nqd6XqA8LbsCuG8MLWWuP865NV6jR1MbXeKxD4HLKDJ", + }, +}; + // Reformat NTT contracts to fit TokenConfig for Route function reformat(contracts: NttContracts) { return Object.entries(TEST_NTT_TOKENS).map(([chain, contracts]) => { diff --git a/sdk/examples/src/helpers.ts b/sdk/examples/src/helpers.ts index 1a6ba87e5..3040a9c8e 100644 --- a/sdk/examples/src/helpers.ts +++ b/sdk/examples/src/helpers.ts @@ -5,6 +5,8 @@ import { Network, Signer, Wormhole, + chainToPlatform, + encoding, } from "@wormhole-foundation/sdk"; import evm from "@wormhole-foundation/sdk/platforms/evm"; @@ -16,6 +18,17 @@ export interface SignerStuff { address: ChainAddress; } +const DEVNET_SOL_PRIVATE_KEY = encoding.b58.encode( + new Uint8Array([ + 14, 173, 153, 4, 176, 224, 201, 111, 32, 237, 183, 185, 159, 247, 22, 161, + 89, 84, 215, 209, 212, 137, 10, 92, 157, 49, 29, 192, 101, 164, 152, 70, 87, + 65, 8, 174, 214, 157, 175, 126, 98, 90, 54, 24, 100, 177, 247, 77, 19, 112, + 47, 44, 165, 109, 233, 102, 14, 86, 109, 29, 134, 145, 132, 141, + ]) +); +const DEVNET_ETH_PRIVATE_KEY = + "0x4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d"; // Ganache default private key + export async function getSigner( chain: ChainContext ): Promise> { @@ -23,19 +36,19 @@ export async function getSigner( (await import("dotenv")).config(); let signer: Signer; - const platform = chain.platform.utils()._platform; + const platform = chainToPlatform(chain.chain); switch (platform) { case "Solana": signer = await solana.getSigner( await chain.getRpc(), - getEnv("OTHER_SOL_PRIVATE_KEY"), - { priorityFeePercentile: 0.9, debug: true } + getEnv("OTHER_SOL_PRIVATE_KEY", DEVNET_SOL_PRIVATE_KEY), + { debug: false } ); break; case "Evm": signer = await evm.getSigner( await chain.getRpc(), - getEnv("ETH_PRIVATE_KEY") + getEnv("ETH_PRIVATE_KEY", DEVNET_ETH_PRIVATE_KEY) ); break; default: @@ -51,15 +64,17 @@ export async function getSigner( // Use .env.example as a template for your .env file and populate it with secrets // for funded accounts on the relevant chain+network combos to run the example -function getEnv(key: string): string { +function getEnv(key: string, dev?: string): string { // If we're in the browser, return empty string if (typeof process === undefined) return ""; // Otherwise, return the env var or error const val = process.env[key]; - if (!val) + if (!val) { + if (dev) return dev; throw new Error( `Missing env var ${key}, did you forget to set values in '.env'?` ); + } return val; } diff --git a/sdk/examples/src/index.ts b/sdk/examples/src/index.ts index e5df4167b..ac76789f0 100644 --- a/sdk/examples/src/index.ts +++ b/sdk/examples/src/index.ts @@ -1,59 +1,76 @@ import { TransactionId, + Wormhole, + amount, signSendWait, - wormhole, } from "@wormhole-foundation/sdk"; -import evm from "@wormhole-foundation/sdk/evm"; -import solana from "@wormhole-foundation/sdk/solana"; +import evm from "@wormhole-foundation/sdk/platforms/evm"; +import solana from "@wormhole-foundation/sdk/platforms/solana"; // register protocol implementations import "@wormhole-foundation/sdk-evm-ntt"; import "@wormhole-foundation/sdk-solana-ntt"; -import { TEST_NTT_TOKENS } from "./consts.js"; +import { TEST_NTT_SPL22_TOKENS, TEST_NTT_TOKENS } from "./consts.js"; import { getSigner } from "./helpers.js"; +// EVM 1.0.0, Solana 1.0.0 +const TOKEN_CONTRACTS = TEST_NTT_TOKENS; +// EVM 1.0.0 Solana 2.0.0 +// const TOKEN_CONTRACTS = TEST_NTT_SPL22_TOKENS; + // Recover an in-flight transfer by setting txids here from output of previous run const recoverTxids: TransactionId[] = [ - // { chain: "Solana", txid: "hZXRs9TEvMWnSAzcgmrEuHsq1C5rbcompy63vkJ2SrXv4a7u6ZBEaJAkBMXKAfScCooDNhN36Jt4PMcDhN8yGjP", }, + //{ chain: "Solana", txid: "hZXRs9TEvMWnSAzcgmrEuHsq1C5rbcompy63vkJ2SrXv4a7u6ZBEaJAkBMXKAfScCooDNhN36Jt4PMcDhN8yGjP", }, + //{ chain: "Sepolia", txid: "0x9f2b1a8124f8377d77deb5c85f165c290669587b494c598beacea60a4d9a00fd", }, + //{ chain: "Sepolia", txid: "0x7c60e520f807593d27702427666e5c72aa282a3f14fe59ec934c5f9de9558609", }, + // Unused and staged + //{chain: "Sepolia", txid: "0x1aff02ed4bf9d51a424626187e3e331304229fc0d422b7abfe8025452b166180"} ]; (async function () { - const wh = await wormhole("Testnet", [solana, evm]); - const src = wh.getChain("Solana"); - const dst = wh.getChain("ArbitrumSepolia"); + const wh = new Wormhole("Testnet", [solana.Platform, evm.Platform]); + const src = wh.getChain("Sepolia"); + const dst = wh.getChain("Solana"); const srcSigner = await getSigner(src); const dstSigner = await getSigner(dst); const srcNtt = await src.getProtocol("Ntt", { - ntt: TEST_NTT_TOKENS[src.chain], + ntt: TOKEN_CONTRACTS[src.chain], }); const dstNtt = await dst.getProtocol("Ntt", { - ntt: TEST_NTT_TOKENS[dst.chain], + ntt: TOKEN_CONTRACTS[dst.chain], }); + const amt = amount.units( + amount.parse("0.01", await srcNtt.getTokenDecimals()) + ); + + const xfer = () => + srcNtt.transfer(srcSigner.address.address, amt, dstSigner.address, { + queue: false, + automatic: false, + gasDropoff: 0n, + }); + // Initiate the transfer (or set to recoverTxids to complete transfer) const txids: TransactionId[] = recoverTxids.length === 0 - ? await signSendWait( - src, - srcNtt.transfer(srcSigner.address.address, 1000n, dstSigner.address, { - queue: false, - automatic: false, - gasDropoff: 0n, - }), - srcSigner.signer - ) + ? await signSendWait(src, xfer(), srcSigner.signer) : recoverTxids; console.log("Source txs", txids); - const vaa = await wh.getVaa(txids[0]!.txid, "Ntt:WormholeTransfer"); + const vaa = await wh.getVaa( + txids[0]!.txid, + "Ntt:WormholeTransfer", + 25 * 60 * 1000 + ); console.log(vaa); const dstTxids = await signSendWait( dst, - dstNtt.redeem([vaa!]), + dstNtt.redeem([vaa!], dstSigner.address.address), dstSigner.signer ); console.log("dstTxids", dstTxids); diff --git a/sdk/examples/tsconfig.cjs.json b/sdk/examples/tsconfig.cjs.json deleted file mode 100644 index b2cc5a3e1..000000000 --- a/sdk/examples/tsconfig.cjs.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "../tsconfig.cjs.json", - "include": ["src/**/*.ts", "src/**/*.json"], - "compilerOptions": { - "outDir": "dist/cjs", - "rootDir": "src", - "resolveJsonModule": true, - "allowUnreachableCode": true, - "allowUnusedLabels": true, - "noUnusedLocals": false - } -} diff --git a/sdk/examples/tsconfig.esm.json b/sdk/examples/tsconfig.json similarity index 66% rename from sdk/examples/tsconfig.esm.json rename to sdk/examples/tsconfig.json index af76dbb7f..c73cad242 100644 --- a/sdk/examples/tsconfig.esm.json +++ b/sdk/examples/tsconfig.json @@ -2,11 +2,13 @@ "extends": "../tsconfig.esm.json", "include": ["src/**/*.ts", "src/**/*.json"], "compilerOptions": { - "outDir": "dist/esm", "rootDir": "src", + "module": "NodeNext", + "moduleResolution": "NodeNext", "resolveJsonModule": true, "allowUnreachableCode": true, "allowUnusedLabels": true, - "noUnusedLocals": false + "noUnusedLocals": false, + "esModuleInterop": true, } } diff --git a/sdk/route/__tests__/route.test.ts b/sdk/route/__tests__/route.test.ts index 7e85e72de..3385c4b6a 100644 --- a/sdk/route/__tests__/route.test.ts +++ b/sdk/route/__tests__/route.test.ts @@ -3,9 +3,10 @@ import { Wormhole, canonicalAddress, routes, - testing, } from "@wormhole-foundation/sdk-connect"; +import * as testing from "@wormhole-foundation/sdk-definitions/testing"; + import "@wormhole-foundation/sdk-definitions-ntt"; import "@wormhole-foundation/sdk-evm-ntt"; import "@wormhole-foundation/sdk-solana-ntt"; diff --git a/sdk/route/package.json b/sdk/route/package.json index ca783ba63..bba4d74dd 100644 --- a/sdk/route/package.json +++ b/sdk/route/package.json @@ -1,6 +1,6 @@ { "name": "@wormhole-foundation/sdk-route-ntt", - "version": "0.0.1-beta.1", + "version": "0.0.1-beta.5", "repository": { "type": "git", "url": "git+https://github.com/wormhole-foundation/connect-sdk.git" @@ -46,10 +46,13 @@ "ts-node": "^10.9.2" }, "dependencies": { - "@wormhole-foundation/sdk-definitions-ntt": "0.0.1-beta.1", - "@wormhole-foundation/sdk-solana-ntt": "0.0.1-beta.1", - "@wormhole-foundation/sdk-evm-ntt": "0.0.1-beta.1", - "@wormhole-foundation/sdk-connect": "0.5.3-beta.9" + "@wormhole-foundation/sdk-definitions-ntt": "0.0.1-beta.5", + "@wormhole-foundation/sdk-solana-ntt": "0.0.1-beta.5", + "@wormhole-foundation/sdk-evm-ntt": "0.0.1-beta.5", + "@wormhole-foundation/sdk-connect": "0.6.5" + }, + "peerDependencies": { + "@wormhole-foundation/sdk-connect": "^0.6" }, "type": "module", "exports": { diff --git a/sdk/route/tsconfig.test.json b/sdk/route/tsconfig.test.json index 14bc32fb4..55b1793db 100644 --- a/sdk/route/tsconfig.test.json +++ b/sdk/route/tsconfig.test.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.json", + "extends": "../../tsconfig.json", "include": ["src/**/*.ts"], "compilerOptions": { "module": "NodeNext", diff --git a/sdk/solana/.gitignore b/sdk/solana/.gitignore deleted file mode 100644 index e69de29bb..000000000 diff --git a/sdk/solana/__tests__/anchor.test.ts b/sdk/solana/__tests__/anchor.test.ts deleted file mode 100644 index 3a1f06095..000000000 --- a/sdk/solana/__tests__/anchor.test.ts +++ /dev/null @@ -1,347 +0,0 @@ -import * as anchor from "@coral-xyz/anchor"; -import * as spl from "@solana/spl-token"; -import { - ChainAddress, - ChainContext, - Signer, - UniversalAddress, - VAA, - Wormhole, - deserialize, - deserializePayload, - encoding, - serialize, - serializePayload, - signSendWait as ssw, - testing, -} from "@wormhole-foundation/sdk-connect"; -import { - SolanaAddress, - SolanaPlatform, - SolanaSendSigner, -} from "@wormhole-foundation/sdk-solana"; -import { SolanaWormholeCore } from "@wormhole-foundation/sdk-solana-core"; -import * as fs from "fs"; - -import { SolanaNtt } from "../src/index.js"; - -const solanaRootDir = `${__dirname}/../../../solana`; - -const GUARDIAN_KEY = - "cfb12303a19cde580bb4dd771639b0d26bc68353645571a8cff516ab2ee113a0"; - -// TODO: are these in either the SDK or anchor.toml? -const CORE_BRIDGE_ADDRESS = "worm2ZoG2kUd4vFXhvjh93UUH596ayRfgQ2MgjNMTth"; -const NTT_ADDRESS = "nttiK1SepaQt6sZ4WGW5whvc9tEnGXGxuKeptcQPCcS"; - -async function signSendWait( - chain: ChainContext, - txs: AsyncGenerator, - signer: Signer -) { - try { - await ssw(chain, txs, signer); - } catch (e) { - console.error(e); - } -} - -const w = new Wormhole("Devnet", [SolanaPlatform], { - chains: { - Solana: { - contracts: { - coreBridge: CORE_BRIDGE_ADDRESS, - }, - }, - }, -}); - -const remoteXcvr: ChainAddress = { - chain: "Ethereum", - address: new UniversalAddress( - encoding.bytes.encode("transceiver".padStart(32, "\0")) - ), -}; -const remoteMgr: ChainAddress = { - chain: "Ethereum", - address: new UniversalAddress( - encoding.bytes.encode("nttManager".padStart(32, "\0")) - ), -}; - -describe("example-native-token-transfers", () => { - const payerSecretKey = Uint8Array.from( - JSON.parse( - fs.readFileSync(`${solanaRootDir}/keys/test.json`, { - encoding: "utf-8", - }) - ) - ); - const payer = anchor.web3.Keypair.fromSecretKey(payerSecretKey); - const owner = anchor.web3.Keypair.generate(); - - const connection = new anchor.web3.Connection( - "http://localhost:8899", - "confirmed" - ); - - // Make sure we're using the exact same Connection obj for rpc - const ctx: ChainContext<"Devnet", "Solana"> = w - .getPlatform("Solana") - .getChain("Solana", connection); - - const signer = new SolanaSendSigner(connection, "Solana", payer); - const sender = Wormhole.parseAddress(signer.chain(), signer.address()); - - const coreBridge = new SolanaWormholeCore("Devnet", "Solana", connection, { - coreBridge: CORE_BRIDGE_ADDRESS, - }); - - let tokenAccount: anchor.web3.PublicKey; - let mint: anchor.web3.PublicKey; - let ntt: SolanaNtt<"Devnet", "Solana">; - - beforeAll(async () => { - // airdrop some tokens to payer - mint = await spl.createMint(connection, payer, owner.publicKey, null, 9); - - // Create our contract client - ntt = new SolanaNtt("Devnet", "Solana", connection, { - ...ctx.config.contracts, - ntt: { - token: mint.toBase58(), - manager: NTT_ADDRESS, - transceiver: { - wormhole: NTT_ADDRESS, - }, - }, - }); - - tokenAccount = await spl.createAssociatedTokenAccount( - connection, - payer, - mint, - payer.publicKey - ); - - await spl.mintTo( - connection, - payer, - mint, - tokenAccount, - owner, - BigInt(10000000) - ); - }); - - describe("Locking", () => { - beforeAll(async () => { - await spl.setAuthority( - connection, - payer, - mint, - owner, - 0, // mint - ntt.pdas.tokenAuthority() - ); - - // init - const initTxs = ntt.initialize({ - payer, - owner: payer, - chain: "Solana", - mint, - outboundLimit: 1000000n, - mode: "locking", - }); - await signSendWait(ctx, initTxs, signer); - - // register - const registerTxs = ntt.registerTransceiver({ - payer, - owner: payer, - transceiver: ntt.program.programId, - }); - await signSendWait(ctx, registerTxs, signer); - - // Set Wormhole xcvr peer - const setXcvrPeerTxs = ntt.setWormholeTransceiverPeer(remoteXcvr, sender); - await signSendWait(ctx, setXcvrPeerTxs, signer); - - // Set manager peer - const setPeerTxs = ntt.setPeer(remoteMgr, 18, 1000000n, sender); - await signSendWait(ctx, setPeerTxs, signer); - }); - - test("Can send tokens", async () => { - // TODO: factor out this test so it can be reused for burn&mint - // transfer some tokens - const amount = 100000n; - const sender = Wormhole.parseAddress("Solana", signer.address()); - - // made up receiver - const receiver = testing.utils.makeUniversalChainAddress("Ethereum"); - - // TODO: keep or remove the `outboxItem` param? - // added as a way to keep tests the same but it technically breaks the Ntt interface - const outboxItem = anchor.web3.Keypair.generate(); - const xferTxs = ntt.transfer( - sender, - amount, - receiver, - { queue: false, automatic: false, gasDropoff: 0n }, - outboxItem - ); - await signSendWait(ctx, xferTxs, signer); - - const wormholeMessage = ntt.pdas.wormholeMessageAccount( - outboxItem.publicKey - ); - - const unsignedVaa = (await coreBridge.parsePostMessageAccount( - wormholeMessage - )) as VAA<"Uint8Array">; // TODO: remove `as` when next version sdk is out - - const transceiverMessage = deserializePayload( - "Ntt:WormholeTransfer", - unsignedVaa.payload - ); - - // assert theat amount is what we expect - expect( - transceiverMessage.nttManagerPayload.payload.trimmedAmount - ).toMatchObject({ amount: 10000n, decimals: 8 }); - - // get from balance - const balance = await connection.getTokenAccountBalance(tokenAccount); - expect(balance.value.amount).toBe("9900000"); - - // grab logs - //await connection.confirmTransaction(redeemTx, "confirmed"); - //const tx = await anchor - // .getProvider() - // .connection.getParsedTransaction(redeemTx, { - // commitment: "confirmed", - // }); - // console.log(tx); - // const log = tx.meta.logMessages[1]; - // const message = log.substring(log.indexOf(':') + 1); - // console.log(message); - // TODO: assert other stuff in the message - // console.log(nttManagerMessage); - }); - - it("Can receive tokens", async () => { - const emitter = new testing.mocks.MockEmitter( - remoteXcvr.address as UniversalAddress, - "Ethereum", - 0n - ); - - const guardians = new testing.mocks.MockGuardians(0, [GUARDIAN_KEY]); - const sender = Wormhole.parseAddress("Solana", signer.address()); - - const sendingTransceiverMessage = { - sourceNttManager: remoteMgr.address as UniversalAddress, - recipientNttManager: new UniversalAddress( - ntt.program.programId.toBytes() - ), - nttManagerPayload: { - id: encoding.bytes.encode("sequence1".padEnd(32, "0")), - sender: new UniversalAddress("FACE".padStart(64, "0")), - payload: { - trimmedAmount: { - amount: 10000n, - decimals: 8, - }, - sourceToken: new UniversalAddress("FAFA".padStart(64, "0")), - recipientAddress: new UniversalAddress(payer.publicKey.toBytes()), - recipientChain: "Solana", - }, - }, - transceiverPayload: new Uint8Array(), - } as const; - - const serialized = serializePayload( - "Ntt:WormholeTransfer", - sendingTransceiverMessage - ); - const published = emitter.publishMessage(0, serialized, 200); - const rawVaa = guardians.addSignatures(published, [0]); - const vaa = deserialize("Ntt:WormholeTransfer", serialize(rawVaa)); - - const redeemTxs = ntt.redeem([vaa], sender); - try { - await signSendWait(ctx, redeemTxs, signer); - } catch (e) { - console.error(e); - return; - } - - // expect(released).to.equal(true); - }); - }); - - describe("Static Checks", () => { - const wh = new Wormhole("Testnet", [SolanaPlatform]); - - const overrides = { - Solana: { - token: "EetppHswYvV1jjRWoQKC1hejdeBDHR9NNzNtCyRQfrrQ", - manager: "NTtAaoDJhkeHeaVUHnyhwbPNAN6WgBpHkHBTc6d7vLK", - transceiver: { - wormhole: "ExVbjD8inGXkt7Cx8jVr4GF175sQy1MeqgfaY53Ah8as", - }, - }, - }; - - describe("ABI Versions Test", function () { - const ctx = wh.getChain("Solana"); - test("It initializes from Rpc", async function () { - const ntt = await SolanaNtt.fromRpc(await ctx.getRpc(), { - Solana: { - ...ctx.config, - contracts: { - ...ctx.config.contracts, - ...{ ntt: overrides["Solana"] }, - }, - }, - }); - expect(ntt).toBeTruthy(); - }); - - test("It initializes from constructor", async function () { - const ntt = new SolanaNtt("Testnet", "Solana", await ctx.getRpc(), { - ...ctx.config.contracts, - ...{ ntt: overrides["Solana"] }, - }); - expect(ntt).toBeTruthy(); - }); - - test("It gets the correct version", async function () { - // TODO: need valida address with lamports on network - - const { manager } = overrides["Solana"]; - const version = await SolanaNtt._getVersion( - manager, - await ctx.getRpc(), - new SolanaAddress(payer.publicKey.toBase58()) - ); - expect(version).toBe("1.0.0"); - }); - }); - }); - - // describe('Burning', () => { - // beforeEach(async () => { - // await ntt.initialize({ - // payer, - // owner, - // chain: 'solana', - // mint, - // outboundLimit: new BN(1000000), - // mode: 'burning' - // }) - // }); - // }); -}); diff --git a/sdk/solana/package.json b/sdk/solana/package.json deleted file mode 100644 index 2a8e1a9d4..000000000 --- a/sdk/solana/package.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "name": "@wormhole-foundation/sdk-solana-ntt", - "version": "0.0.1-beta.1", - "repository": { - "type": "git", - "url": "git+https://github.com/wormhole-foundation/connect-sdk.git" - }, - "bugs": { - "url": "https://github.com/wormhole-foundation/connect-sdk/issues" - }, - "homepage": "https://github.com/wormhole-foundation/connect-sdk#readme", - "directories": { - "test": "__tests__" - }, - "license": "Apache-2.0", - "main": "./dist/cjs/index.js", - "types": "./dist/cjs/index.d.ts", - "module": "./dist/esm/index.js", - "description": "SDK for Solana, used in conjunction with @wormhole-foundation/sdk", - "files": [ - "dist/esm", - "dist/cjs" - ], - "keywords": [ - "wormhole", - "sdk", - "typescript", - "ntt", - "solana" - ], - "engines": { - "node": ">=16" - }, - "sideEffects": true, - "scripts": { - "build:cjs": "tsc -p ./tsconfig.cjs.json && echo '{\"type\":\"commonjs\"}' > dist/cjs/package.json", - "build:esm": "tsc -p ./tsconfig.esm.json", - "build": "npm run build:esm && npm run build:cjs", - "rebuild": "npm run clean && npm run build", - "clean": "rm -rf ./dist", - "test:ci": "jest --config ./jest.config.ts", - "copy:idl": "cp ../../solana/target/idl/*.json ./src/anchor-idl/$IDL_VERSION/", - "copy:types": "cp ../../solana/target/types/*.ts ./src/anchor-idl/$IDL_VERSION/", - "generate": "export IDL_VERSION=`../../solana/scripts/program-version | sed s/\\\\\\./_/g` && mkdir -p ./src/anchor-idl/$IDL_VERSION && npm run copy:idl && npm run copy:types", - "build:contracts": "cd ../../solana && make build" - }, - "devDependencies": { - "@types/bn.js": "^5.1.5", - "nock": "^13.3.3", - "ts-jest": "^29.1.2", - "ts-node": "^10.9.2", - "tsx": "^4.7.2" - }, - "dependencies": { - "@coral-xyz/anchor": "0.29.0", - "@coral-xyz/borsh": "0.29.0", - "@solana/spl-token": "0.3.9", - "@solana/web3.js": "1.91.7", - "@wormhole-foundation/sdk-definitions-ntt": "0.0.1-beta.1", - "@wormhole-foundation/sdk-solana": "0.5.3-beta.9", - "@wormhole-foundation/sdk-solana-core": "0.5.3-beta.9" - }, - "type": "module", - "exports": { - ".": { - "import": { - "types": "./dist/esm/index.d.ts", - "default": "./dist/esm/index.js" - }, - "require": { - "types": "./dist/cjs/index.d.ts", - "default": "./dist/cjs/index.js" - } - } - } -} diff --git a/sdk/solana/src/anchor-idl/1_0_0.ts b/sdk/solana/src/anchor-idl/1_0_0.ts deleted file mode 100644 index e2859f2f5..000000000 --- a/sdk/solana/src/anchor-idl/1_0_0.ts +++ /dev/null @@ -1,15 +0,0 @@ -import ntt from "./1_0_0/example_native_token_transfers.json"; -import quoter from "./1_0_0/ntt_quoter.json"; -import governance from "./1_0_0/wormhole_governance.json"; - -import type { ExampleNativeTokenTransfers } from "./1_0_0/example_native_token_transfers.js"; -import type { NttQuoter } from "./1_0_0/ntt_quoter.js"; -import type { WormholeGovernance } from "./1_0_0/wormhole_governance.js"; - -export namespace _1_0_0 { - export const idl = { ntt, quoter, governance }; - - export type RawExampleNativeTokenTransfers = ExampleNativeTokenTransfers; - export type RawNttQuoter = NttQuoter; - export type RawWormholeGovernance = WormholeGovernance; -} diff --git a/sdk/solana/src/anchor-idl/1_0_0/example_native_token_transfers.ts b/sdk/solana/src/anchor-idl/1_0_0/example_native_token_transfers.ts deleted file mode 100644 index fa85dfa73..000000000 --- a/sdk/solana/src/anchor-idl/1_0_0/example_native_token_transfers.ts +++ /dev/null @@ -1,3763 +0,0 @@ -export type ExampleNativeTokenTransfers = { - "version": "1.0.0", - "name": "example_native_token_transfers", - "instructions": [ - { - "name": "initialize", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "deployer", - "isMut": false, - "isSigner": true - }, - { - "name": "programData", - "isMut": false, - "isSigner": false - }, - { - "name": "config", - "isMut": true, - "isSigner": false - }, - { - "name": "mint", - "isMut": false, - "isSigner": false - }, - { - "name": "rateLimit", - "isMut": true, - "isSigner": false - }, - { - "name": "tokenAuthority", - "isMut": false, - "isSigner": false - }, - { - "name": "custody", - "isMut": true, - "isSigner": false, - "docs": [ - "The custody account that holds tokens in locking mode.", - "NOTE: the account is unconditionally initialized, but not used in", - "burning mode.", - "function if the token account has already been created." - ] - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "associated token account for the given mint." - ] - }, - { - "name": "associatedTokenProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "bpfLoaderUpgradeableProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "InitializeArgs" - } - } - ] - }, - { - "name": "version", - "accounts": [], - "args": [], - "returns": "string" - }, - { - "name": "transferBurn", - "accounts": [ - { - "name": "common", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "config", - "accounts": [ - { - "name": "config", - "isMut": false, - "isSigner": false - } - ] - }, - { - "name": "mint", - "isMut": true, - "isSigner": false - }, - { - "name": "from", - "isMut": true, - "isSigner": false, - "docs": [ - "account can spend these tokens." - ] - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "outboxItem", - "isMut": true, - "isSigner": true - }, - { - "name": "outboxRateLimit", - "isMut": true, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ] - }, - { - "name": "inboxRateLimit", - "isMut": true, - "isSigner": false - }, - { - "name": "peer", - "isMut": false, - "isSigner": false - }, - { - "name": "sessionAuthority", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "TransferArgs" - } - } - ] - }, - { - "name": "transferLock", - "accounts": [ - { - "name": "common", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "config", - "accounts": [ - { - "name": "config", - "isMut": false, - "isSigner": false - } - ] - }, - { - "name": "mint", - "isMut": true, - "isSigner": false - }, - { - "name": "from", - "isMut": true, - "isSigner": false, - "docs": [ - "account can spend these tokens." - ] - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "outboxItem", - "isMut": true, - "isSigner": true - }, - { - "name": "outboxRateLimit", - "isMut": true, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ] - }, - { - "name": "inboxRateLimit", - "isMut": true, - "isSigner": false - }, - { - "name": "peer", - "isMut": false, - "isSigner": false - }, - { - "name": "sessionAuthority", - "isMut": false, - "isSigner": false - }, - { - "name": "custody", - "isMut": true, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "TransferArgs" - } - } - ] - }, - { - "name": "redeem", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "config", - "isMut": false, - "isSigner": false - }, - { - "name": "peer", - "isMut": false, - "isSigner": false - }, - { - "name": "transceiverMessage", - "isMut": false, - "isSigner": false - }, - { - "name": "transceiver", - "isMut": false, - "isSigner": false - }, - { - "name": "mint", - "isMut": false, - "isSigner": false - }, - { - "name": "inboxItem", - "isMut": true, - "isSigner": false, - "docs": [ - "NOTE: This account is content-addressed (PDA seeded by the message hash).", - "This is because in a multi-transceiver configuration, the different", - "transceivers \"vote\" on messages (by delivering them). By making the inbox", - "items content-addressed, we can ensure that disagreeing votes don't", - "interfere with each other.", - "On the first call to [`redeem()`], [`InboxItem`] will be allocated and initialized with", - "default values.", - "On subsequent calls, we want to modify the `InboxItem` by \"voting\" on it. Therefore the", - "program should not fail which would occur when using the `init` constraint.", - "The [`InboxItem::init`] field is used to guard against malicious or accidental modification", - "InboxItem fields that should remain constant." - ] - }, - { - "name": "inboxRateLimit", - "isMut": true, - "isSigner": false - }, - { - "name": "outboxRateLimit", - "isMut": true, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "RedeemArgs" - } - } - ] - }, - { - "name": "releaseInboundMint", - "accounts": [ - { - "name": "common", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "config", - "accounts": [ - { - "name": "config", - "isMut": false, - "isSigner": false - } - ] - }, - { - "name": "inboxItem", - "isMut": true, - "isSigner": false - }, - { - "name": "recipient", - "isMut": true, - "isSigner": false - }, - { - "name": "tokenAuthority", - "isMut": false, - "isSigner": false - }, - { - "name": "mint", - "isMut": true, - "isSigner": false - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false - } - ] - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "ReleaseInboundArgs" - } - } - ] - }, - { - "name": "releaseInboundUnlock", - "accounts": [ - { - "name": "common", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "config", - "accounts": [ - { - "name": "config", - "isMut": false, - "isSigner": false - } - ] - }, - { - "name": "inboxItem", - "isMut": true, - "isSigner": false - }, - { - "name": "recipient", - "isMut": true, - "isSigner": false - }, - { - "name": "tokenAuthority", - "isMut": false, - "isSigner": false - }, - { - "name": "mint", - "isMut": true, - "isSigner": false - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false - } - ] - }, - { - "name": "custody", - "isMut": true, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "ReleaseInboundArgs" - } - } - ] - }, - { - "name": "transferOwnership", - "accounts": [ - { - "name": "config", - "isMut": true, - "isSigner": false - }, - { - "name": "owner", - "isMut": false, - "isSigner": true - }, - { - "name": "newOwner", - "isMut": false, - "isSigner": false - }, - { - "name": "upgradeLock", - "isMut": false, - "isSigner": false - }, - { - "name": "programData", - "isMut": true, - "isSigner": false - }, - { - "name": "bpfLoaderUpgradeableProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [] - }, - { - "name": "claimOwnership", - "accounts": [ - { - "name": "config", - "isMut": true, - "isSigner": false - }, - { - "name": "upgradeLock", - "isMut": false, - "isSigner": false - }, - { - "name": "newOwner", - "isMut": false, - "isSigner": true - }, - { - "name": "programData", - "isMut": true, - "isSigner": false - }, - { - "name": "bpfLoaderUpgradeableProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [] - }, - { - "name": "setPaused", - "accounts": [ - { - "name": "owner", - "isMut": false, - "isSigner": true - }, - { - "name": "config", - "isMut": true, - "isSigner": false - } - ], - "args": [ - { - "name": "pause", - "type": "bool" - } - ] - }, - { - "name": "setPeer", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "owner", - "isMut": false, - "isSigner": true - }, - { - "name": "config", - "isMut": false, - "isSigner": false - }, - { - "name": "peer", - "isMut": true, - "isSigner": false - }, - { - "name": "inboxRateLimit", - "isMut": true, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "SetPeerArgs" - } - } - ] - }, - { - "name": "registerTransceiver", - "accounts": [ - { - "name": "config", - "isMut": true, - "isSigner": false - }, - { - "name": "owner", - "isMut": false, - "isSigner": true - }, - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "transceiver", - "isMut": false, - "isSigner": false - }, - { - "name": "registeredTransceiver", - "isMut": true, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [] - }, - { - "name": "setOutboundLimit", - "accounts": [ - { - "name": "config", - "isMut": false, - "isSigner": false - }, - { - "name": "owner", - "isMut": false, - "isSigner": true - }, - { - "name": "rateLimit", - "isMut": true, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "SetOutboundLimitArgs" - } - } - ] - }, - { - "name": "setInboundLimit", - "accounts": [ - { - "name": "config", - "isMut": false, - "isSigner": false - }, - { - "name": "owner", - "isMut": false, - "isSigner": true - }, - { - "name": "rateLimit", - "isMut": true, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "SetInboundLimitArgs" - } - } - ] - }, - { - "name": "setWormholePeer", - "accounts": [ - { - "name": "config", - "isMut": false, - "isSigner": false - }, - { - "name": "owner", - "isMut": false, - "isSigner": true - }, - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "peer", - "isMut": true, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "SetTransceiverPeerArgs" - } - } - ] - }, - { - "name": "receiveWormholeMessage", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "config", - "accounts": [ - { - "name": "config", - "isMut": false, - "isSigner": false - } - ] - }, - { - "name": "peer", - "isMut": false, - "isSigner": false - }, - { - "name": "vaa", - "isMut": false, - "isSigner": false - }, - { - "name": "transceiverMessage", - "isMut": true, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [] - }, - { - "name": "releaseWormholeOutbound", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "config", - "accounts": [ - { - "name": "config", - "isMut": false, - "isSigner": false - } - ] - }, - { - "name": "outboxItem", - "isMut": true, - "isSigner": false - }, - { - "name": "transceiver", - "isMut": false, - "isSigner": false - }, - { - "name": "wormholeMessage", - "isMut": true, - "isSigner": false - }, - { - "name": "emitter", - "isMut": false, - "isSigner": false - }, - { - "name": "wormhole", - "accounts": [ - { - "name": "bridge", - "isMut": true, - "isSigner": false - }, - { - "name": "feeCollector", - "isMut": true, - "isSigner": false - }, - { - "name": "sequence", - "isMut": true, - "isSigner": false - }, - { - "name": "program", - "isMut": false, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "clock", - "isMut": false, - "isSigner": false - }, - { - "name": "rent", - "isMut": false, - "isSigner": false - } - ] - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "ReleaseOutboundArgs" - } - } - ] - }, - { - "name": "broadcastWormholeId", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "config", - "isMut": false, - "isSigner": false - }, - { - "name": "mint", - "isMut": false, - "isSigner": false - }, - { - "name": "wormholeMessage", - "isMut": true, - "isSigner": true - }, - { - "name": "emitter", - "isMut": false, - "isSigner": false - }, - { - "name": "wormhole", - "accounts": [ - { - "name": "bridge", - "isMut": true, - "isSigner": false - }, - { - "name": "feeCollector", - "isMut": true, - "isSigner": false - }, - { - "name": "sequence", - "isMut": true, - "isSigner": false - }, - { - "name": "program", - "isMut": false, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "clock", - "isMut": false, - "isSigner": false - }, - { - "name": "rent", - "isMut": false, - "isSigner": false - } - ] - } - ], - "args": [] - }, - { - "name": "broadcastWormholePeer", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "config", - "isMut": false, - "isSigner": false - }, - { - "name": "peer", - "isMut": false, - "isSigner": false - }, - { - "name": "wormholeMessage", - "isMut": true, - "isSigner": true - }, - { - "name": "emitter", - "isMut": false, - "isSigner": false - }, - { - "name": "wormhole", - "accounts": [ - { - "name": "bridge", - "isMut": true, - "isSigner": false - }, - { - "name": "feeCollector", - "isMut": true, - "isSigner": false - }, - { - "name": "sequence", - "isMut": true, - "isSigner": false - }, - { - "name": "program", - "isMut": false, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "clock", - "isMut": false, - "isSigner": false - }, - { - "name": "rent", - "isMut": false, - "isSigner": false - } - ] - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "BroadcastPeerArgs" - } - } - ] - } - ], - "accounts": [ - { - "name": "config", - "type": { - "kind": "struct", - "fields": [ - { - "name": "bump", - "type": "u8" - }, - { - "name": "owner", - "docs": [ - "Owner of the program." - ], - "type": "publicKey" - }, - { - "name": "pendingOwner", - "docs": [ - "Pending next owner (before claiming ownership)." - ], - "type": { - "option": "publicKey" - } - }, - { - "name": "mint", - "docs": [ - "Mint address of the token managed by this program." - ], - "type": "publicKey" - }, - { - "name": "tokenProgram", - "docs": [ - "Address of the token program (token or token22). This could always be queried", - "from the [`mint`] account's owner, but storing it here avoids an indirection", - "on the client side." - ], - "type": "publicKey" - }, - { - "name": "mode", - "docs": [ - "The mode that this program is running in. This is used to determine", - "whether the program is burning tokens or locking tokens." - ], - "type": { - "defined": "Mode" - } - }, - { - "name": "chainId", - "docs": [ - "The chain id of the chain that this program is running on. We don't", - "hardcode this so that the program is deployable on any potential SVM", - "forks." - ], - "type": { - "defined": "ChainId" - } - }, - { - "name": "nextTransceiverId", - "docs": [ - "The next transceiver id to use when registering an transceiver." - ], - "type": "u8" - }, - { - "name": "threshold", - "docs": [ - "The number of transceivers that must attest to a transfer before it is", - "accepted." - ], - "type": "u8" - }, - { - "name": "enabledTransceivers", - "docs": [ - "Bitmap of enabled transceivers.", - "The maximum number of transceivers is equal to [`Bitmap::BITS`]." - ], - "type": { - "defined": "Bitmap" - } - }, - { - "name": "paused", - "docs": [ - "Pause the program. This is useful for upgrades and other maintenance." - ], - "type": "bool" - }, - { - "name": "custody", - "docs": [ - "The custody account that holds tokens in locking mode." - ], - "type": "publicKey" - } - ] - } - }, - { - "name": "validatedTransceiverMessage", - "generics": [ - "A" - ], - "type": { - "kind": "struct", - "fields": [ - { - "name": "fromChain", - "type": { - "defined": "ChainId" - } - }, - { - "name": "message", - "type": { - "definedWithTypeArgs": { - "name": "TransceiverMessageData", - "args": [ - { - "type": { - "generic": "A" - } - } - ] - } - } - } - ] - } - }, - { - "name": "nttManagerPeer", - "docs": [ - "A peer on another chain. Stored in a PDA seeded by the chain id." - ], - "type": { - "kind": "struct", - "fields": [ - { - "name": "bump", - "type": "u8" - }, - { - "name": "address", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "tokenDecimals", - "type": "u8" - } - ] - } - }, - { - "name": "inboxItem", - "type": { - "kind": "struct", - "fields": [ - { - "name": "init", - "type": "bool" - }, - { - "name": "bump", - "type": "u8" - }, - { - "name": "amount", - "type": "u64" - }, - { - "name": "recipientAddress", - "type": "publicKey" - }, - { - "name": "votes", - "type": { - "defined": "Bitmap" - } - }, - { - "name": "releaseStatus", - "type": { - "defined": "ReleaseStatus" - } - } - ] - } - }, - { - "name": "inboxRateLimit", - "docs": [ - "Inbound rate limit per chain.", - "SECURITY: must check the PDA (since there are multiple PDAs, namely one for each chain.)" - ], - "type": { - "kind": "struct", - "fields": [ - { - "name": "bump", - "type": "u8" - }, - { - "name": "rateLimit", - "type": { - "defined": "RateLimitState" - } - } - ] - } - }, - { - "name": "outboxItem", - "type": { - "kind": "struct", - "fields": [ - { - "name": "amount", - "type": { - "defined": "TrimmedAmount" - } - }, - { - "name": "sender", - "type": "publicKey" - }, - { - "name": "recipientChain", - "type": { - "defined": "ChainId" - } - }, - { - "name": "recipientNttManager", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "recipientAddress", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "releaseTimestamp", - "type": "i64" - }, - { - "name": "released", - "type": { - "defined": "Bitmap" - } - } - ] - } - }, - { - "name": "outboxRateLimit", - "type": { - "kind": "struct", - "fields": [ - { - "name": "rateLimit", - "type": { - "defined": "RateLimitState" - } - } - ] - } - }, - { - "name": "registeredTransceiver", - "type": { - "kind": "struct", - "fields": [ - { - "name": "bump", - "type": "u8" - }, - { - "name": "id", - "type": "u8" - }, - { - "name": "transceiverAddress", - "type": "publicKey" - } - ] - } - }, - { - "name": "transceiverPeer", - "docs": [ - "A peer on another chain. Stored in a PDA seeded by the chain id." - ], - "type": { - "kind": "struct", - "fields": [ - { - "name": "bump", - "type": "u8" - }, - { - "name": "address", - "type": { - "array": [ - "u8", - 32 - ] - } - } - ] - } - }, - { - "name": "bridgeData", - "type": { - "kind": "struct", - "fields": [ - { - "name": "guardianSetIndex", - "docs": [ - "The current guardian set index, used to decide which signature sets to accept." - ], - "type": "u32" - }, - { - "name": "lastLamports", - "docs": [ - "Lamports in the collection account" - ], - "type": "u64" - }, - { - "name": "config", - "docs": [ - "Bridge configuration, which is set once upon initialization." - ], - "type": { - "defined": "BridgeConfig" - } - } - ] - } - } - ], - "types": [ - { - "name": "Bitmap", - "type": { - "kind": "struct", - "fields": [ - { - "name": "map", - "type": "u128" - } - ] - } - }, - { - "name": "SetInboundLimitArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "limit", - "type": "u64" - }, - { - "name": "chainId", - "type": { - "defined": "ChainId" - } - } - ] - } - }, - { - "name": "SetOutboundLimitArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "limit", - "type": "u64" - } - ] - } - }, - { - "name": "SetPeerArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "chainId", - "type": { - "defined": "ChainId" - } - }, - { - "name": "address", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "limit", - "type": "u64" - }, - { - "name": "tokenDecimals", - "docs": [ - "The token decimals on the peer chain." - ], - "type": "u8" - } - ] - } - }, - { - "name": "InitializeArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "chainId", - "type": "u16" - }, - { - "name": "limit", - "type": "u64" - }, - { - "name": "mode", - "type": { - "defined": "Mode" - } - } - ] - } - }, - { - "name": "RedeemArgs", - "type": { - "kind": "struct", - "fields": [] - } - }, - { - "name": "ReleaseInboundArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "revertOnDelay", - "type": "bool" - } - ] - } - }, - { - "name": "TransferArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "amount", - "type": "u64" - }, - { - "name": "recipientChain", - "type": { - "defined": "ChainId" - } - }, - { - "name": "recipientAddress", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "shouldQueue", - "type": "bool" - } - ] - } - }, - { - "name": "ReleaseStatus", - "docs": [ - "The status of an InboxItem. This determines whether the tokens are minted/unlocked to the recipient. As", - "such, this must be used as a state machine that moves forward in a linear manner. A state", - "should never \"move backward\" to a previous state (e.g. should never move from `Released` to", - "`ReleaseAfter`)." - ], - "type": { - "kind": "enum", - "variants": [ - { - "name": "NotApproved" - }, - { - "name": "ReleaseAfter", - "fields": [ - "i64" - ] - }, - { - "name": "Released" - } - ] - } - }, - { - "name": "RateLimitState", - "type": { - "kind": "struct", - "fields": [ - { - "name": "limit", - "docs": [ - "The maximum capacity of the rate limiter." - ], - "type": "u64" - }, - { - "name": "capacityAtLastTx", - "docs": [ - "The capacity of the rate limiter at `last_tx_timestamp`.", - "The actual current capacity is calculated in `capacity_at`, by", - "accounting for the time that has passed since `last_tx_timestamp` and", - "the refill rate." - ], - "type": "u64" - }, - { - "name": "lastTxTimestamp", - "docs": [ - "The timestamp of the last transaction that counted towards the current", - "capacity. Transactions that exceeded the capacity do not count, they are", - "just delayed." - ], - "type": "i64" - } - ] - } - }, - { - "name": "SetTransceiverPeerArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "chainId", - "type": { - "defined": "ChainId" - } - }, - { - "name": "address", - "type": { - "array": [ - "u8", - 32 - ] - } - } - ] - } - }, - { - "name": "BroadcastPeerArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "chainId", - "type": "u16" - } - ] - } - }, - { - "name": "ReleaseOutboundArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "revertOnDelay", - "type": "bool" - } - ] - } - }, - { - "name": "ChainId", - "type": { - "kind": "struct", - "fields": [ - { - "name": "id", - "type": "u16" - } - ] - } - }, - { - "name": "Mode", - "type": { - "kind": "enum", - "variants": [ - { - "name": "Locking" - }, - { - "name": "Burning" - } - ] - } - }, - { - "name": "NttManagerMessage", - "generics": [ - "A" - ], - "type": { - "kind": "struct", - "fields": [ - { - "name": "id", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "sender", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "payload", - "type": { - "generic": "A" - } - } - ] - } - }, - { - "name": "TransceiverMessageData", - "generics": [ - "A" - ], - "type": { - "kind": "struct", - "fields": [ - { - "name": "sourceNttManager", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "recipientNttManager", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "nttManagerPayload", - "type": { - "definedWithTypeArgs": { - "name": "NttManagerMessage", - "args": [ - { - "type": { - "generic": "A" - } - } - ] - } - } - } - ] - } - }, - { - "name": "TrimmedAmount", - "type": { - "kind": "struct", - "fields": [ - { - "name": "amount", - "type": "u64" - }, - { - "name": "decimals", - "type": "u8" - } - ] - } - }, - { - "name": "BridgeConfig", - "type": { - "kind": "struct", - "fields": [ - { - "name": "guardianSetExpirationTime", - "docs": [ - "Period for how long a guardian set is valid after it has been replaced by a new one. This", - "guarantees that VAAs issued by that set can still be submitted for a certain period. In", - "this period we still trust the old guardian set." - ], - "type": "u32" - }, - { - "name": "fee", - "docs": [ - "Amount of lamports that needs to be paid to the protocol to post a message" - ], - "type": "u64" - } - ] - } - } - ], - "errors": [ - { - "code": 6000, - "name": "CantReleaseYet", - "msg": "CantReleaseYet" - }, - { - "code": 6001, - "name": "InvalidPendingOwner", - "msg": "InvalidPendingOwner" - }, - { - "code": 6002, - "name": "InvalidChainId", - "msg": "InvalidChainId" - }, - { - "code": 6003, - "name": "InvalidRecipientAddress", - "msg": "InvalidRecipientAddress" - }, - { - "code": 6004, - "name": "InvalidTransceiverPeer", - "msg": "InvalidTransceiverPeer" - }, - { - "code": 6005, - "name": "InvalidNttManagerPeer", - "msg": "InvalidNttManagerPeer" - }, - { - "code": 6006, - "name": "InvalidRecipientNttManager", - "msg": "InvalidRecipientNttManager" - }, - { - "code": 6007, - "name": "TransferAlreadyRedeemed", - "msg": "TransferAlreadyRedeemed" - }, - { - "code": 6008, - "name": "TransferCannotBeRedeemed", - "msg": "TransferCannotBeRedeemed" - }, - { - "code": 6009, - "name": "TransferNotApproved", - "msg": "TransferNotApproved" - }, - { - "code": 6010, - "name": "MessageAlreadySent", - "msg": "MessageAlreadySent" - }, - { - "code": 6011, - "name": "InvalidMode", - "msg": "InvalidMode" - }, - { - "code": 6012, - "name": "InvalidMintAuthority", - "msg": "InvalidMintAuthority" - }, - { - "code": 6013, - "name": "TransferExceedsRateLimit", - "msg": "TransferExceedsRateLimit" - }, - { - "code": 6014, - "name": "Paused", - "msg": "Paused" - }, - { - "code": 6015, - "name": "DisabledTransceiver", - "msg": "DisabledTransceiver" - }, - { - "code": 6016, - "name": "InvalidDeployer", - "msg": "InvalidDeployer" - }, - { - "code": 6017, - "name": "BadAmountAfterTransfer", - "msg": "BadAmountAfterTransfer" - }, - { - "code": 6018, - "name": "BadAmountAfterBurn", - "msg": "BadAmountAfterBurn" - }, - { - "code": 6019, - "name": "ZeroThreshold", - "msg": "ZeroThreshold" - }, - { - "code": 6020, - "name": "OverflowExponent", - "msg": "OverflowExponent" - }, - { - "code": 6021, - "name": "OverflowScaledAmount", - "msg": "OverflowScaledAmount" - }, - { - "code": 6022, - "name": "BitmapIndexOutOfBounds", - "msg": "BitmapIndexOutOfBounds" - } - ] -}; - -export const IDL: ExampleNativeTokenTransfers = { - "version": "1.0.0", - "name": "example_native_token_transfers", - "instructions": [ - { - "name": "initialize", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "deployer", - "isMut": false, - "isSigner": true - }, - { - "name": "programData", - "isMut": false, - "isSigner": false - }, - { - "name": "config", - "isMut": true, - "isSigner": false - }, - { - "name": "mint", - "isMut": false, - "isSigner": false - }, - { - "name": "rateLimit", - "isMut": true, - "isSigner": false - }, - { - "name": "tokenAuthority", - "isMut": false, - "isSigner": false - }, - { - "name": "custody", - "isMut": true, - "isSigner": false, - "docs": [ - "The custody account that holds tokens in locking mode.", - "NOTE: the account is unconditionally initialized, but not used in", - "burning mode.", - "function if the token account has already been created." - ] - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "associated token account for the given mint." - ] - }, - { - "name": "associatedTokenProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "bpfLoaderUpgradeableProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "InitializeArgs" - } - } - ] - }, - { - "name": "version", - "accounts": [], - "args": [], - "returns": "string" - }, - { - "name": "transferBurn", - "accounts": [ - { - "name": "common", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "config", - "accounts": [ - { - "name": "config", - "isMut": false, - "isSigner": false - } - ] - }, - { - "name": "mint", - "isMut": true, - "isSigner": false - }, - { - "name": "from", - "isMut": true, - "isSigner": false, - "docs": [ - "account can spend these tokens." - ] - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "outboxItem", - "isMut": true, - "isSigner": true - }, - { - "name": "outboxRateLimit", - "isMut": true, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ] - }, - { - "name": "inboxRateLimit", - "isMut": true, - "isSigner": false - }, - { - "name": "peer", - "isMut": false, - "isSigner": false - }, - { - "name": "sessionAuthority", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "TransferArgs" - } - } - ] - }, - { - "name": "transferLock", - "accounts": [ - { - "name": "common", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "config", - "accounts": [ - { - "name": "config", - "isMut": false, - "isSigner": false - } - ] - }, - { - "name": "mint", - "isMut": true, - "isSigner": false - }, - { - "name": "from", - "isMut": true, - "isSigner": false, - "docs": [ - "account can spend these tokens." - ] - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "outboxItem", - "isMut": true, - "isSigner": true - }, - { - "name": "outboxRateLimit", - "isMut": true, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ] - }, - { - "name": "inboxRateLimit", - "isMut": true, - "isSigner": false - }, - { - "name": "peer", - "isMut": false, - "isSigner": false - }, - { - "name": "sessionAuthority", - "isMut": false, - "isSigner": false - }, - { - "name": "custody", - "isMut": true, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "TransferArgs" - } - } - ] - }, - { - "name": "redeem", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "config", - "isMut": false, - "isSigner": false - }, - { - "name": "peer", - "isMut": false, - "isSigner": false - }, - { - "name": "transceiverMessage", - "isMut": false, - "isSigner": false - }, - { - "name": "transceiver", - "isMut": false, - "isSigner": false - }, - { - "name": "mint", - "isMut": false, - "isSigner": false - }, - { - "name": "inboxItem", - "isMut": true, - "isSigner": false, - "docs": [ - "NOTE: This account is content-addressed (PDA seeded by the message hash).", - "This is because in a multi-transceiver configuration, the different", - "transceivers \"vote\" on messages (by delivering them). By making the inbox", - "items content-addressed, we can ensure that disagreeing votes don't", - "interfere with each other.", - "On the first call to [`redeem()`], [`InboxItem`] will be allocated and initialized with", - "default values.", - "On subsequent calls, we want to modify the `InboxItem` by \"voting\" on it. Therefore the", - "program should not fail which would occur when using the `init` constraint.", - "The [`InboxItem::init`] field is used to guard against malicious or accidental modification", - "InboxItem fields that should remain constant." - ] - }, - { - "name": "inboxRateLimit", - "isMut": true, - "isSigner": false - }, - { - "name": "outboxRateLimit", - "isMut": true, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "RedeemArgs" - } - } - ] - }, - { - "name": "releaseInboundMint", - "accounts": [ - { - "name": "common", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "config", - "accounts": [ - { - "name": "config", - "isMut": false, - "isSigner": false - } - ] - }, - { - "name": "inboxItem", - "isMut": true, - "isSigner": false - }, - { - "name": "recipient", - "isMut": true, - "isSigner": false - }, - { - "name": "tokenAuthority", - "isMut": false, - "isSigner": false - }, - { - "name": "mint", - "isMut": true, - "isSigner": false - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false - } - ] - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "ReleaseInboundArgs" - } - } - ] - }, - { - "name": "releaseInboundUnlock", - "accounts": [ - { - "name": "common", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "config", - "accounts": [ - { - "name": "config", - "isMut": false, - "isSigner": false - } - ] - }, - { - "name": "inboxItem", - "isMut": true, - "isSigner": false - }, - { - "name": "recipient", - "isMut": true, - "isSigner": false - }, - { - "name": "tokenAuthority", - "isMut": false, - "isSigner": false - }, - { - "name": "mint", - "isMut": true, - "isSigner": false - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false - } - ] - }, - { - "name": "custody", - "isMut": true, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "ReleaseInboundArgs" - } - } - ] - }, - { - "name": "transferOwnership", - "accounts": [ - { - "name": "config", - "isMut": true, - "isSigner": false - }, - { - "name": "owner", - "isMut": false, - "isSigner": true - }, - { - "name": "newOwner", - "isMut": false, - "isSigner": false - }, - { - "name": "upgradeLock", - "isMut": false, - "isSigner": false - }, - { - "name": "programData", - "isMut": true, - "isSigner": false - }, - { - "name": "bpfLoaderUpgradeableProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [] - }, - { - "name": "claimOwnership", - "accounts": [ - { - "name": "config", - "isMut": true, - "isSigner": false - }, - { - "name": "upgradeLock", - "isMut": false, - "isSigner": false - }, - { - "name": "newOwner", - "isMut": false, - "isSigner": true - }, - { - "name": "programData", - "isMut": true, - "isSigner": false - }, - { - "name": "bpfLoaderUpgradeableProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [] - }, - { - "name": "setPaused", - "accounts": [ - { - "name": "owner", - "isMut": false, - "isSigner": true - }, - { - "name": "config", - "isMut": true, - "isSigner": false - } - ], - "args": [ - { - "name": "pause", - "type": "bool" - } - ] - }, - { - "name": "setPeer", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "owner", - "isMut": false, - "isSigner": true - }, - { - "name": "config", - "isMut": false, - "isSigner": false - }, - { - "name": "peer", - "isMut": true, - "isSigner": false - }, - { - "name": "inboxRateLimit", - "isMut": true, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "SetPeerArgs" - } - } - ] - }, - { - "name": "registerTransceiver", - "accounts": [ - { - "name": "config", - "isMut": true, - "isSigner": false - }, - { - "name": "owner", - "isMut": false, - "isSigner": true - }, - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "transceiver", - "isMut": false, - "isSigner": false - }, - { - "name": "registeredTransceiver", - "isMut": true, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [] - }, - { - "name": "setOutboundLimit", - "accounts": [ - { - "name": "config", - "isMut": false, - "isSigner": false - }, - { - "name": "owner", - "isMut": false, - "isSigner": true - }, - { - "name": "rateLimit", - "isMut": true, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "SetOutboundLimitArgs" - } - } - ] - }, - { - "name": "setInboundLimit", - "accounts": [ - { - "name": "config", - "isMut": false, - "isSigner": false - }, - { - "name": "owner", - "isMut": false, - "isSigner": true - }, - { - "name": "rateLimit", - "isMut": true, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "SetInboundLimitArgs" - } - } - ] - }, - { - "name": "setWormholePeer", - "accounts": [ - { - "name": "config", - "isMut": false, - "isSigner": false - }, - { - "name": "owner", - "isMut": false, - "isSigner": true - }, - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "peer", - "isMut": true, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "SetTransceiverPeerArgs" - } - } - ] - }, - { - "name": "receiveWormholeMessage", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "config", - "accounts": [ - { - "name": "config", - "isMut": false, - "isSigner": false - } - ] - }, - { - "name": "peer", - "isMut": false, - "isSigner": false - }, - { - "name": "vaa", - "isMut": false, - "isSigner": false - }, - { - "name": "transceiverMessage", - "isMut": true, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [] - }, - { - "name": "releaseWormholeOutbound", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "config", - "accounts": [ - { - "name": "config", - "isMut": false, - "isSigner": false - } - ] - }, - { - "name": "outboxItem", - "isMut": true, - "isSigner": false - }, - { - "name": "transceiver", - "isMut": false, - "isSigner": false - }, - { - "name": "wormholeMessage", - "isMut": true, - "isSigner": false - }, - { - "name": "emitter", - "isMut": false, - "isSigner": false - }, - { - "name": "wormhole", - "accounts": [ - { - "name": "bridge", - "isMut": true, - "isSigner": false - }, - { - "name": "feeCollector", - "isMut": true, - "isSigner": false - }, - { - "name": "sequence", - "isMut": true, - "isSigner": false - }, - { - "name": "program", - "isMut": false, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "clock", - "isMut": false, - "isSigner": false - }, - { - "name": "rent", - "isMut": false, - "isSigner": false - } - ] - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "ReleaseOutboundArgs" - } - } - ] - }, - { - "name": "broadcastWormholeId", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "config", - "isMut": false, - "isSigner": false - }, - { - "name": "mint", - "isMut": false, - "isSigner": false - }, - { - "name": "wormholeMessage", - "isMut": true, - "isSigner": true - }, - { - "name": "emitter", - "isMut": false, - "isSigner": false - }, - { - "name": "wormhole", - "accounts": [ - { - "name": "bridge", - "isMut": true, - "isSigner": false - }, - { - "name": "feeCollector", - "isMut": true, - "isSigner": false - }, - { - "name": "sequence", - "isMut": true, - "isSigner": false - }, - { - "name": "program", - "isMut": false, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "clock", - "isMut": false, - "isSigner": false - }, - { - "name": "rent", - "isMut": false, - "isSigner": false - } - ] - } - ], - "args": [] - }, - { - "name": "broadcastWormholePeer", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "config", - "isMut": false, - "isSigner": false - }, - { - "name": "peer", - "isMut": false, - "isSigner": false - }, - { - "name": "wormholeMessage", - "isMut": true, - "isSigner": true - }, - { - "name": "emitter", - "isMut": false, - "isSigner": false - }, - { - "name": "wormhole", - "accounts": [ - { - "name": "bridge", - "isMut": true, - "isSigner": false - }, - { - "name": "feeCollector", - "isMut": true, - "isSigner": false - }, - { - "name": "sequence", - "isMut": true, - "isSigner": false - }, - { - "name": "program", - "isMut": false, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "clock", - "isMut": false, - "isSigner": false - }, - { - "name": "rent", - "isMut": false, - "isSigner": false - } - ] - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "BroadcastPeerArgs" - } - } - ] - } - ], - "accounts": [ - { - "name": "config", - "type": { - "kind": "struct", - "fields": [ - { - "name": "bump", - "type": "u8" - }, - { - "name": "owner", - "docs": [ - "Owner of the program." - ], - "type": "publicKey" - }, - { - "name": "pendingOwner", - "docs": [ - "Pending next owner (before claiming ownership)." - ], - "type": { - "option": "publicKey" - } - }, - { - "name": "mint", - "docs": [ - "Mint address of the token managed by this program." - ], - "type": "publicKey" - }, - { - "name": "tokenProgram", - "docs": [ - "Address of the token program (token or token22). This could always be queried", - "from the [`mint`] account's owner, but storing it here avoids an indirection", - "on the client side." - ], - "type": "publicKey" - }, - { - "name": "mode", - "docs": [ - "The mode that this program is running in. This is used to determine", - "whether the program is burning tokens or locking tokens." - ], - "type": { - "defined": "Mode" - } - }, - { - "name": "chainId", - "docs": [ - "The chain id of the chain that this program is running on. We don't", - "hardcode this so that the program is deployable on any potential SVM", - "forks." - ], - "type": { - "defined": "ChainId" - } - }, - { - "name": "nextTransceiverId", - "docs": [ - "The next transceiver id to use when registering an transceiver." - ], - "type": "u8" - }, - { - "name": "threshold", - "docs": [ - "The number of transceivers that must attest to a transfer before it is", - "accepted." - ], - "type": "u8" - }, - { - "name": "enabledTransceivers", - "docs": [ - "Bitmap of enabled transceivers.", - "The maximum number of transceivers is equal to [`Bitmap::BITS`]." - ], - "type": { - "defined": "Bitmap" - } - }, - { - "name": "paused", - "docs": [ - "Pause the program. This is useful for upgrades and other maintenance." - ], - "type": "bool" - }, - { - "name": "custody", - "docs": [ - "The custody account that holds tokens in locking mode." - ], - "type": "publicKey" - } - ] - } - }, - { - "name": "validatedTransceiverMessage", - "generics": [ - "A" - ], - "type": { - "kind": "struct", - "fields": [ - { - "name": "fromChain", - "type": { - "defined": "ChainId" - } - }, - { - "name": "message", - "type": { - "definedWithTypeArgs": { - "name": "TransceiverMessageData", - "args": [ - { - "type": { - "generic": "A" - } - } - ] - } - } - } - ] - } - }, - { - "name": "nttManagerPeer", - "docs": [ - "A peer on another chain. Stored in a PDA seeded by the chain id." - ], - "type": { - "kind": "struct", - "fields": [ - { - "name": "bump", - "type": "u8" - }, - { - "name": "address", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "tokenDecimals", - "type": "u8" - } - ] - } - }, - { - "name": "inboxItem", - "type": { - "kind": "struct", - "fields": [ - { - "name": "init", - "type": "bool" - }, - { - "name": "bump", - "type": "u8" - }, - { - "name": "amount", - "type": "u64" - }, - { - "name": "recipientAddress", - "type": "publicKey" - }, - { - "name": "votes", - "type": { - "defined": "Bitmap" - } - }, - { - "name": "releaseStatus", - "type": { - "defined": "ReleaseStatus" - } - } - ] - } - }, - { - "name": "inboxRateLimit", - "docs": [ - "Inbound rate limit per chain.", - "SECURITY: must check the PDA (since there are multiple PDAs, namely one for each chain.)" - ], - "type": { - "kind": "struct", - "fields": [ - { - "name": "bump", - "type": "u8" - }, - { - "name": "rateLimit", - "type": { - "defined": "RateLimitState" - } - } - ] - } - }, - { - "name": "outboxItem", - "type": { - "kind": "struct", - "fields": [ - { - "name": "amount", - "type": { - "defined": "TrimmedAmount" - } - }, - { - "name": "sender", - "type": "publicKey" - }, - { - "name": "recipientChain", - "type": { - "defined": "ChainId" - } - }, - { - "name": "recipientNttManager", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "recipientAddress", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "releaseTimestamp", - "type": "i64" - }, - { - "name": "released", - "type": { - "defined": "Bitmap" - } - } - ] - } - }, - { - "name": "outboxRateLimit", - "type": { - "kind": "struct", - "fields": [ - { - "name": "rateLimit", - "type": { - "defined": "RateLimitState" - } - } - ] - } - }, - { - "name": "registeredTransceiver", - "type": { - "kind": "struct", - "fields": [ - { - "name": "bump", - "type": "u8" - }, - { - "name": "id", - "type": "u8" - }, - { - "name": "transceiverAddress", - "type": "publicKey" - } - ] - } - }, - { - "name": "transceiverPeer", - "docs": [ - "A peer on another chain. Stored in a PDA seeded by the chain id." - ], - "type": { - "kind": "struct", - "fields": [ - { - "name": "bump", - "type": "u8" - }, - { - "name": "address", - "type": { - "array": [ - "u8", - 32 - ] - } - } - ] - } - }, - { - "name": "bridgeData", - "type": { - "kind": "struct", - "fields": [ - { - "name": "guardianSetIndex", - "docs": [ - "The current guardian set index, used to decide which signature sets to accept." - ], - "type": "u32" - }, - { - "name": "lastLamports", - "docs": [ - "Lamports in the collection account" - ], - "type": "u64" - }, - { - "name": "config", - "docs": [ - "Bridge configuration, which is set once upon initialization." - ], - "type": { - "defined": "BridgeConfig" - } - } - ] - } - } - ], - "types": [ - { - "name": "Bitmap", - "type": { - "kind": "struct", - "fields": [ - { - "name": "map", - "type": "u128" - } - ] - } - }, - { - "name": "SetInboundLimitArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "limit", - "type": "u64" - }, - { - "name": "chainId", - "type": { - "defined": "ChainId" - } - } - ] - } - }, - { - "name": "SetOutboundLimitArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "limit", - "type": "u64" - } - ] - } - }, - { - "name": "SetPeerArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "chainId", - "type": { - "defined": "ChainId" - } - }, - { - "name": "address", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "limit", - "type": "u64" - }, - { - "name": "tokenDecimals", - "docs": [ - "The token decimals on the peer chain." - ], - "type": "u8" - } - ] - } - }, - { - "name": "InitializeArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "chainId", - "type": "u16" - }, - { - "name": "limit", - "type": "u64" - }, - { - "name": "mode", - "type": { - "defined": "Mode" - } - } - ] - } - }, - { - "name": "RedeemArgs", - "type": { - "kind": "struct", - "fields": [] - } - }, - { - "name": "ReleaseInboundArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "revertOnDelay", - "type": "bool" - } - ] - } - }, - { - "name": "TransferArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "amount", - "type": "u64" - }, - { - "name": "recipientChain", - "type": { - "defined": "ChainId" - } - }, - { - "name": "recipientAddress", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "shouldQueue", - "type": "bool" - } - ] - } - }, - { - "name": "ReleaseStatus", - "docs": [ - "The status of an InboxItem. This determines whether the tokens are minted/unlocked to the recipient. As", - "such, this must be used as a state machine that moves forward in a linear manner. A state", - "should never \"move backward\" to a previous state (e.g. should never move from `Released` to", - "`ReleaseAfter`)." - ], - "type": { - "kind": "enum", - "variants": [ - { - "name": "NotApproved" - }, - { - "name": "ReleaseAfter", - "fields": [ - "i64" - ] - }, - { - "name": "Released" - } - ] - } - }, - { - "name": "RateLimitState", - "type": { - "kind": "struct", - "fields": [ - { - "name": "limit", - "docs": [ - "The maximum capacity of the rate limiter." - ], - "type": "u64" - }, - { - "name": "capacityAtLastTx", - "docs": [ - "The capacity of the rate limiter at `last_tx_timestamp`.", - "The actual current capacity is calculated in `capacity_at`, by", - "accounting for the time that has passed since `last_tx_timestamp` and", - "the refill rate." - ], - "type": "u64" - }, - { - "name": "lastTxTimestamp", - "docs": [ - "The timestamp of the last transaction that counted towards the current", - "capacity. Transactions that exceeded the capacity do not count, they are", - "just delayed." - ], - "type": "i64" - } - ] - } - }, - { - "name": "SetTransceiverPeerArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "chainId", - "type": { - "defined": "ChainId" - } - }, - { - "name": "address", - "type": { - "array": [ - "u8", - 32 - ] - } - } - ] - } - }, - { - "name": "BroadcastPeerArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "chainId", - "type": "u16" - } - ] - } - }, - { - "name": "ReleaseOutboundArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "revertOnDelay", - "type": "bool" - } - ] - } - }, - { - "name": "ChainId", - "type": { - "kind": "struct", - "fields": [ - { - "name": "id", - "type": "u16" - } - ] - } - }, - { - "name": "Mode", - "type": { - "kind": "enum", - "variants": [ - { - "name": "Locking" - }, - { - "name": "Burning" - } - ] - } - }, - { - "name": "NttManagerMessage", - "generics": [ - "A" - ], - "type": { - "kind": "struct", - "fields": [ - { - "name": "id", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "sender", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "payload", - "type": { - "generic": "A" - } - } - ] - } - }, - { - "name": "TransceiverMessageData", - "generics": [ - "A" - ], - "type": { - "kind": "struct", - "fields": [ - { - "name": "sourceNttManager", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "recipientNttManager", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "nttManagerPayload", - "type": { - "definedWithTypeArgs": { - "name": "NttManagerMessage", - "args": [ - { - "type": { - "generic": "A" - } - } - ] - } - } - } - ] - } - }, - { - "name": "TrimmedAmount", - "type": { - "kind": "struct", - "fields": [ - { - "name": "amount", - "type": "u64" - }, - { - "name": "decimals", - "type": "u8" - } - ] - } - }, - { - "name": "BridgeConfig", - "type": { - "kind": "struct", - "fields": [ - { - "name": "guardianSetExpirationTime", - "docs": [ - "Period for how long a guardian set is valid after it has been replaced by a new one. This", - "guarantees that VAAs issued by that set can still be submitted for a certain period. In", - "this period we still trust the old guardian set." - ], - "type": "u32" - }, - { - "name": "fee", - "docs": [ - "Amount of lamports that needs to be paid to the protocol to post a message" - ], - "type": "u64" - } - ] - } - } - ], - "errors": [ - { - "code": 6000, - "name": "CantReleaseYet", - "msg": "CantReleaseYet" - }, - { - "code": 6001, - "name": "InvalidPendingOwner", - "msg": "InvalidPendingOwner" - }, - { - "code": 6002, - "name": "InvalidChainId", - "msg": "InvalidChainId" - }, - { - "code": 6003, - "name": "InvalidRecipientAddress", - "msg": "InvalidRecipientAddress" - }, - { - "code": 6004, - "name": "InvalidTransceiverPeer", - "msg": "InvalidTransceiverPeer" - }, - { - "code": 6005, - "name": "InvalidNttManagerPeer", - "msg": "InvalidNttManagerPeer" - }, - { - "code": 6006, - "name": "InvalidRecipientNttManager", - "msg": "InvalidRecipientNttManager" - }, - { - "code": 6007, - "name": "TransferAlreadyRedeemed", - "msg": "TransferAlreadyRedeemed" - }, - { - "code": 6008, - "name": "TransferCannotBeRedeemed", - "msg": "TransferCannotBeRedeemed" - }, - { - "code": 6009, - "name": "TransferNotApproved", - "msg": "TransferNotApproved" - }, - { - "code": 6010, - "name": "MessageAlreadySent", - "msg": "MessageAlreadySent" - }, - { - "code": 6011, - "name": "InvalidMode", - "msg": "InvalidMode" - }, - { - "code": 6012, - "name": "InvalidMintAuthority", - "msg": "InvalidMintAuthority" - }, - { - "code": 6013, - "name": "TransferExceedsRateLimit", - "msg": "TransferExceedsRateLimit" - }, - { - "code": 6014, - "name": "Paused", - "msg": "Paused" - }, - { - "code": 6015, - "name": "DisabledTransceiver", - "msg": "DisabledTransceiver" - }, - { - "code": 6016, - "name": "InvalidDeployer", - "msg": "InvalidDeployer" - }, - { - "code": 6017, - "name": "BadAmountAfterTransfer", - "msg": "BadAmountAfterTransfer" - }, - { - "code": 6018, - "name": "BadAmountAfterBurn", - "msg": "BadAmountAfterBurn" - }, - { - "code": 6019, - "name": "ZeroThreshold", - "msg": "ZeroThreshold" - }, - { - "code": 6020, - "name": "OverflowExponent", - "msg": "OverflowExponent" - }, - { - "code": 6021, - "name": "OverflowScaledAmount", - "msg": "OverflowScaledAmount" - }, - { - "code": 6022, - "name": "BitmapIndexOutOfBounds", - "msg": "BitmapIndexOutOfBounds" - } - ] -}; diff --git a/sdk/solana/src/anchor-idl/1_0_0/ntt_quoter.json b/sdk/solana/src/anchor-idl/1_0_0/ntt_quoter.json deleted file mode 100644 index c756bd654..000000000 --- a/sdk/solana/src/anchor-idl/1_0_0/ntt_quoter.json +++ /dev/null @@ -1,588 +0,0 @@ -{ - "version": "1.0.0", - "name": "ntt_quoter", - "instructions": [ - { - "name": "requestRelay", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "instance", - "isMut": false, - "isSigner": false - }, - { - "name": "registeredChain", - "isMut": false, - "isSigner": false - }, - { - "name": "registeredNtt", - "isMut": false, - "isSigner": false - }, - { - "name": "outboxItem", - "isMut": false, - "isSigner": false, - "docs": [ - "and checking the release constraint into a single function" - ] - }, - { - "name": "relayRequest", - "isMut": true, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "RequestRelayArgs" - } - } - ] - }, - { - "name": "closeRelay", - "accounts": [ - { - "name": "authority", - "isMut": false, - "isSigner": true - }, - { - "name": "instance", - "isMut": false, - "isSigner": false - }, - { - "name": "feeRecipient", - "isMut": true, - "isSigner": false - }, - { - "name": "relayRequest", - "isMut": true, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [] - }, - { - "name": "initialize", - "accounts": [ - { - "name": "owner", - "isMut": true, - "isSigner": true - }, - { - "name": "instance", - "isMut": true, - "isSigner": false - }, - { - "name": "feeRecipient", - "isMut": false, - "isSigner": false - }, - { - "name": "programData", - "isMut": true, - "isSigner": false, - "docs": [ - "We use the program data to make sure this owner is the upgrade authority (the true owner,", - "who deployed this program)." - ] - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [] - }, - { - "name": "setAssistant", - "accounts": [ - { - "name": "owner", - "isMut": false, - "isSigner": true - }, - { - "name": "instance", - "isMut": true, - "isSigner": false - }, - { - "name": "assistant", - "isMut": false, - "isSigner": false, - "isOptional": true - } - ], - "args": [] - }, - { - "name": "setFeeRecipient", - "accounts": [ - { - "name": "owner", - "isMut": false, - "isSigner": true - }, - { - "name": "instance", - "isMut": true, - "isSigner": false - }, - { - "name": "feeRecipient", - "isMut": false, - "isSigner": false - } - ], - "args": [] - }, - { - "name": "registerChain", - "accounts": [ - { - "name": "authority", - "isMut": true, - "isSigner": true - }, - { - "name": "instance", - "isMut": false, - "isSigner": false - }, - { - "name": "registeredChain", - "isMut": true, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "RegisterChainArgs" - } - } - ] - }, - { - "name": "registerNtt", - "accounts": [ - { - "name": "authority", - "isMut": true, - "isSigner": true - }, - { - "name": "instance", - "isMut": false, - "isSigner": false - }, - { - "name": "registeredNtt", - "isMut": true, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "RegisterNttArgs" - } - } - ] - }, - { - "name": "deregisterNtt", - "accounts": [ - { - "name": "authority", - "isMut": true, - "isSigner": true - }, - { - "name": "instance", - "isMut": false, - "isSigner": false - }, - { - "name": "registeredNtt", - "isMut": true, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "DeregisterNttArgs" - } - } - ] - }, - { - "name": "updateSolPrice", - "accounts": [ - { - "name": "authority", - "isMut": false, - "isSigner": true - }, - { - "name": "instance", - "isMut": true, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "UpdateSolPriceArgs" - } - } - ] - }, - { - "name": "updateChainPrices", - "accounts": [ - { - "name": "authority", - "isMut": false, - "isSigner": true - }, - { - "name": "instance", - "isMut": false, - "isSigner": false - }, - { - "name": "registeredChain", - "isMut": true, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "UpdateChainPricesArgs" - } - } - ] - }, - { - "name": "updateChainParams", - "accounts": [ - { - "name": "authority", - "isMut": false, - "isSigner": true - }, - { - "name": "instance", - "isMut": false, - "isSigner": false - }, - { - "name": "registeredChain", - "isMut": true, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "UpdateChainParamsArgs" - } - } - ] - } - ], - "accounts": [ - { - "name": "Instance", - "type": { - "kind": "struct", - "fields": [ - { - "name": "owner", - "type": "publicKey" - }, - { - "name": "assistant", - "type": "publicKey" - }, - { - "name": "feeRecipient", - "type": "publicKey" - }, - { - "name": "solPrice", - "type": "u64" - } - ] - } - }, - { - "name": "RegisteredChain", - "type": { - "kind": "struct", - "fields": [ - { - "name": "bump", - "type": "u8" - }, - { - "name": "maxGasDropoff", - "type": "u64" - }, - { - "name": "basePrice", - "type": "u64" - }, - { - "name": "nativePrice", - "type": "u64" - }, - { - "name": "gasPrice", - "type": "u64" - } - ] - } - }, - { - "name": "RegisteredNtt", - "type": { - "kind": "struct", - "fields": [ - { - "name": "bump", - "type": "u8" - }, - { - "name": "wormholeTransceiverIndex", - "type": "u8" - }, - { - "name": "gasCost", - "type": "u32" - } - ] - } - }, - { - "name": "RelayRequest", - "type": { - "kind": "struct", - "fields": [ - { - "name": "requestedGasDropoff", - "type": "u64" - } - ] - } - } - ], - "types": [ - { - "name": "RegisterChainArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "chainId", - "type": "u16" - } - ] - } - }, - { - "name": "RegisterNttArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "nttProgramId", - "type": "publicKey" - }, - { - "name": "wormholeTransceiverIndex", - "type": "u8" - }, - { - "name": "gasCost", - "type": "u32" - } - ] - } - }, - { - "name": "DeregisterNttArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "nttProgramId", - "type": "publicKey" - } - ] - } - }, - { - "name": "RequestRelayArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "gasDropoff", - "type": "u64" - }, - { - "name": "maxFee", - "type": "u64" - } - ] - } - }, - { - "name": "UpdateSolPriceArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "solPrice", - "type": "u64" - } - ] - } - }, - { - "name": "UpdateChainPricesArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "nativePrice", - "type": "u64" - }, - { - "name": "gasPrice", - "type": "u64" - } - ] - } - }, - { - "name": "UpdateChainParamsArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "maxGasDropoff", - "type": "u64" - }, - { - "name": "basePrice", - "type": "u64" - } - ] - } - } - ], - "errors": [ - { - "code": 6001, - "name": "ExceedsUserMaxFee", - "msg": "Relay fees exceeds specified max" - }, - { - "code": 6002, - "name": "ExceedsMaxGasDropoff", - "msg": "Requested gas dropoff exceeds max allowed for chain" - }, - { - "code": 6003, - "name": "InvalidFeeRecipient", - "msg": "The specified fee recipient does not match the address in the instance accound" - }, - { - "code": 6004, - "name": "RelayingToChainDisabled", - "msg": "Relaying to the specified chain is disabled" - }, - { - "code": 6005, - "name": "OutboxItemNotReleased", - "msg": "Relaying to the specified chain is disabled" - }, - { - "code": 6006, - "name": "ScalingOverflow", - "msg": "Scaled value exceeds u64::MAX" - }, - { - "code": 6007, - "name": "DivByZero", - "msg": "Cannot divide by zero" - }, - { - "code": 6257, - "name": "FeeRecipientCannotBeDefault", - "msg": "The fee recipient cannot be the default address (0x0)" - }, - { - "code": 6258, - "name": "NotAuthorized", - "msg": "Must be owner or assistant" - }, - { - "code": 6259, - "name": "PriceCannotBeZero", - "msg": "The price cannot be zero" - } - ] -} \ No newline at end of file diff --git a/sdk/solana/src/anchor-idl/1_0_0/ntt_quoter.ts b/sdk/solana/src/anchor-idl/1_0_0/ntt_quoter.ts deleted file mode 100644 index 298ae9042..000000000 --- a/sdk/solana/src/anchor-idl/1_0_0/ntt_quoter.ts +++ /dev/null @@ -1,1177 +0,0 @@ -export type NttQuoter = { - "version": "1.0.0", - "name": "ntt_quoter", - "instructions": [ - { - "name": "requestRelay", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "instance", - "isMut": false, - "isSigner": false - }, - { - "name": "registeredChain", - "isMut": false, - "isSigner": false - }, - { - "name": "registeredNtt", - "isMut": false, - "isSigner": false - }, - { - "name": "outboxItem", - "isMut": false, - "isSigner": false, - "docs": [ - "and checking the release constraint into a single function" - ] - }, - { - "name": "relayRequest", - "isMut": true, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "RequestRelayArgs" - } - } - ] - }, - { - "name": "closeRelay", - "accounts": [ - { - "name": "authority", - "isMut": false, - "isSigner": true - }, - { - "name": "instance", - "isMut": false, - "isSigner": false - }, - { - "name": "feeRecipient", - "isMut": true, - "isSigner": false - }, - { - "name": "relayRequest", - "isMut": true, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [] - }, - { - "name": "initialize", - "accounts": [ - { - "name": "owner", - "isMut": true, - "isSigner": true - }, - { - "name": "instance", - "isMut": true, - "isSigner": false - }, - { - "name": "feeRecipient", - "isMut": false, - "isSigner": false - }, - { - "name": "programData", - "isMut": true, - "isSigner": false, - "docs": [ - "We use the program data to make sure this owner is the upgrade authority (the true owner,", - "who deployed this program)." - ] - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [] - }, - { - "name": "setAssistant", - "accounts": [ - { - "name": "owner", - "isMut": false, - "isSigner": true - }, - { - "name": "instance", - "isMut": true, - "isSigner": false - }, - { - "name": "assistant", - "isMut": false, - "isSigner": false, - "isOptional": true - } - ], - "args": [] - }, - { - "name": "setFeeRecipient", - "accounts": [ - { - "name": "owner", - "isMut": false, - "isSigner": true - }, - { - "name": "instance", - "isMut": true, - "isSigner": false - }, - { - "name": "feeRecipient", - "isMut": false, - "isSigner": false - } - ], - "args": [] - }, - { - "name": "registerChain", - "accounts": [ - { - "name": "authority", - "isMut": true, - "isSigner": true - }, - { - "name": "instance", - "isMut": false, - "isSigner": false - }, - { - "name": "registeredChain", - "isMut": true, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "RegisterChainArgs" - } - } - ] - }, - { - "name": "registerNtt", - "accounts": [ - { - "name": "authority", - "isMut": true, - "isSigner": true - }, - { - "name": "instance", - "isMut": false, - "isSigner": false - }, - { - "name": "registeredNtt", - "isMut": true, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "RegisterNttArgs" - } - } - ] - }, - { - "name": "deregisterNtt", - "accounts": [ - { - "name": "authority", - "isMut": true, - "isSigner": true - }, - { - "name": "instance", - "isMut": false, - "isSigner": false - }, - { - "name": "registeredNtt", - "isMut": true, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "DeregisterNttArgs" - } - } - ] - }, - { - "name": "updateSolPrice", - "accounts": [ - { - "name": "authority", - "isMut": false, - "isSigner": true - }, - { - "name": "instance", - "isMut": true, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "UpdateSolPriceArgs" - } - } - ] - }, - { - "name": "updateChainPrices", - "accounts": [ - { - "name": "authority", - "isMut": false, - "isSigner": true - }, - { - "name": "instance", - "isMut": false, - "isSigner": false - }, - { - "name": "registeredChain", - "isMut": true, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "UpdateChainPricesArgs" - } - } - ] - }, - { - "name": "updateChainParams", - "accounts": [ - { - "name": "authority", - "isMut": false, - "isSigner": true - }, - { - "name": "instance", - "isMut": false, - "isSigner": false - }, - { - "name": "registeredChain", - "isMut": true, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "UpdateChainParamsArgs" - } - } - ] - } - ], - "accounts": [ - { - "name": "instance", - "type": { - "kind": "struct", - "fields": [ - { - "name": "owner", - "type": "publicKey" - }, - { - "name": "assistant", - "type": "publicKey" - }, - { - "name": "feeRecipient", - "type": "publicKey" - }, - { - "name": "solPrice", - "type": "u64" - } - ] - } - }, - { - "name": "registeredChain", - "type": { - "kind": "struct", - "fields": [ - { - "name": "bump", - "type": "u8" - }, - { - "name": "maxGasDropoff", - "type": "u64" - }, - { - "name": "basePrice", - "type": "u64" - }, - { - "name": "nativePrice", - "type": "u64" - }, - { - "name": "gasPrice", - "type": "u64" - } - ] - } - }, - { - "name": "registeredNtt", - "type": { - "kind": "struct", - "fields": [ - { - "name": "bump", - "type": "u8" - }, - { - "name": "wormholeTransceiverIndex", - "type": "u8" - }, - { - "name": "gasCost", - "type": "u32" - } - ] - } - }, - { - "name": "relayRequest", - "type": { - "kind": "struct", - "fields": [ - { - "name": "requestedGasDropoff", - "type": "u64" - } - ] - } - } - ], - "types": [ - { - "name": "RegisterChainArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "chainId", - "type": "u16" - } - ] - } - }, - { - "name": "RegisterNttArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "nttProgramId", - "type": "publicKey" - }, - { - "name": "wormholeTransceiverIndex", - "type": "u8" - }, - { - "name": "gasCost", - "type": "u32" - } - ] - } - }, - { - "name": "DeregisterNttArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "nttProgramId", - "type": "publicKey" - } - ] - } - }, - { - "name": "RequestRelayArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "gasDropoff", - "type": "u64" - }, - { - "name": "maxFee", - "type": "u64" - } - ] - } - }, - { - "name": "UpdateSolPriceArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "solPrice", - "type": "u64" - } - ] - } - }, - { - "name": "UpdateChainPricesArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "nativePrice", - "type": "u64" - }, - { - "name": "gasPrice", - "type": "u64" - } - ] - } - }, - { - "name": "UpdateChainParamsArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "maxGasDropoff", - "type": "u64" - }, - { - "name": "basePrice", - "type": "u64" - } - ] - } - } - ], - "errors": [ - { - "code": 6001, - "name": "ExceedsUserMaxFee", - "msg": "Relay fees exceeds specified max" - }, - { - "code": 6002, - "name": "ExceedsMaxGasDropoff", - "msg": "Requested gas dropoff exceeds max allowed for chain" - }, - { - "code": 6003, - "name": "InvalidFeeRecipient", - "msg": "The specified fee recipient does not match the address in the instance accound" - }, - { - "code": 6004, - "name": "RelayingToChainDisabled", - "msg": "Relaying to the specified chain is disabled" - }, - { - "code": 6005, - "name": "OutboxItemNotReleased", - "msg": "Relaying to the specified chain is disabled" - }, - { - "code": 6006, - "name": "ScalingOverflow", - "msg": "Scaled value exceeds u64::MAX" - }, - { - "code": 6007, - "name": "DivByZero", - "msg": "Cannot divide by zero" - }, - { - "code": 6257, - "name": "FeeRecipientCannotBeDefault", - "msg": "The fee recipient cannot be the default address (0x0)" - }, - { - "code": 6258, - "name": "NotAuthorized", - "msg": "Must be owner or assistant" - }, - { - "code": 6259, - "name": "PriceCannotBeZero", - "msg": "The price cannot be zero" - } - ] -}; - -export const IDL: NttQuoter = { - "version": "1.0.0", - "name": "ntt_quoter", - "instructions": [ - { - "name": "requestRelay", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "instance", - "isMut": false, - "isSigner": false - }, - { - "name": "registeredChain", - "isMut": false, - "isSigner": false - }, - { - "name": "registeredNtt", - "isMut": false, - "isSigner": false - }, - { - "name": "outboxItem", - "isMut": false, - "isSigner": false, - "docs": [ - "and checking the release constraint into a single function" - ] - }, - { - "name": "relayRequest", - "isMut": true, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "RequestRelayArgs" - } - } - ] - }, - { - "name": "closeRelay", - "accounts": [ - { - "name": "authority", - "isMut": false, - "isSigner": true - }, - { - "name": "instance", - "isMut": false, - "isSigner": false - }, - { - "name": "feeRecipient", - "isMut": true, - "isSigner": false - }, - { - "name": "relayRequest", - "isMut": true, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [] - }, - { - "name": "initialize", - "accounts": [ - { - "name": "owner", - "isMut": true, - "isSigner": true - }, - { - "name": "instance", - "isMut": true, - "isSigner": false - }, - { - "name": "feeRecipient", - "isMut": false, - "isSigner": false - }, - { - "name": "programData", - "isMut": true, - "isSigner": false, - "docs": [ - "We use the program data to make sure this owner is the upgrade authority (the true owner,", - "who deployed this program)." - ] - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [] - }, - { - "name": "setAssistant", - "accounts": [ - { - "name": "owner", - "isMut": false, - "isSigner": true - }, - { - "name": "instance", - "isMut": true, - "isSigner": false - }, - { - "name": "assistant", - "isMut": false, - "isSigner": false, - "isOptional": true - } - ], - "args": [] - }, - { - "name": "setFeeRecipient", - "accounts": [ - { - "name": "owner", - "isMut": false, - "isSigner": true - }, - { - "name": "instance", - "isMut": true, - "isSigner": false - }, - { - "name": "feeRecipient", - "isMut": false, - "isSigner": false - } - ], - "args": [] - }, - { - "name": "registerChain", - "accounts": [ - { - "name": "authority", - "isMut": true, - "isSigner": true - }, - { - "name": "instance", - "isMut": false, - "isSigner": false - }, - { - "name": "registeredChain", - "isMut": true, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "RegisterChainArgs" - } - } - ] - }, - { - "name": "registerNtt", - "accounts": [ - { - "name": "authority", - "isMut": true, - "isSigner": true - }, - { - "name": "instance", - "isMut": false, - "isSigner": false - }, - { - "name": "registeredNtt", - "isMut": true, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "RegisterNttArgs" - } - } - ] - }, - { - "name": "deregisterNtt", - "accounts": [ - { - "name": "authority", - "isMut": true, - "isSigner": true - }, - { - "name": "instance", - "isMut": false, - "isSigner": false - }, - { - "name": "registeredNtt", - "isMut": true, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "DeregisterNttArgs" - } - } - ] - }, - { - "name": "updateSolPrice", - "accounts": [ - { - "name": "authority", - "isMut": false, - "isSigner": true - }, - { - "name": "instance", - "isMut": true, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "UpdateSolPriceArgs" - } - } - ] - }, - { - "name": "updateChainPrices", - "accounts": [ - { - "name": "authority", - "isMut": false, - "isSigner": true - }, - { - "name": "instance", - "isMut": false, - "isSigner": false - }, - { - "name": "registeredChain", - "isMut": true, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "UpdateChainPricesArgs" - } - } - ] - }, - { - "name": "updateChainParams", - "accounts": [ - { - "name": "authority", - "isMut": false, - "isSigner": true - }, - { - "name": "instance", - "isMut": false, - "isSigner": false - }, - { - "name": "registeredChain", - "isMut": true, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "UpdateChainParamsArgs" - } - } - ] - } - ], - "accounts": [ - { - "name": "instance", - "type": { - "kind": "struct", - "fields": [ - { - "name": "owner", - "type": "publicKey" - }, - { - "name": "assistant", - "type": "publicKey" - }, - { - "name": "feeRecipient", - "type": "publicKey" - }, - { - "name": "solPrice", - "type": "u64" - } - ] - } - }, - { - "name": "registeredChain", - "type": { - "kind": "struct", - "fields": [ - { - "name": "bump", - "type": "u8" - }, - { - "name": "maxGasDropoff", - "type": "u64" - }, - { - "name": "basePrice", - "type": "u64" - }, - { - "name": "nativePrice", - "type": "u64" - }, - { - "name": "gasPrice", - "type": "u64" - } - ] - } - }, - { - "name": "registeredNtt", - "type": { - "kind": "struct", - "fields": [ - { - "name": "bump", - "type": "u8" - }, - { - "name": "wormholeTransceiverIndex", - "type": "u8" - }, - { - "name": "gasCost", - "type": "u32" - } - ] - } - }, - { - "name": "relayRequest", - "type": { - "kind": "struct", - "fields": [ - { - "name": "requestedGasDropoff", - "type": "u64" - } - ] - } - } - ], - "types": [ - { - "name": "RegisterChainArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "chainId", - "type": "u16" - } - ] - } - }, - { - "name": "RegisterNttArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "nttProgramId", - "type": "publicKey" - }, - { - "name": "wormholeTransceiverIndex", - "type": "u8" - }, - { - "name": "gasCost", - "type": "u32" - } - ] - } - }, - { - "name": "DeregisterNttArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "nttProgramId", - "type": "publicKey" - } - ] - } - }, - { - "name": "RequestRelayArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "gasDropoff", - "type": "u64" - }, - { - "name": "maxFee", - "type": "u64" - } - ] - } - }, - { - "name": "UpdateSolPriceArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "solPrice", - "type": "u64" - } - ] - } - }, - { - "name": "UpdateChainPricesArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "nativePrice", - "type": "u64" - }, - { - "name": "gasPrice", - "type": "u64" - } - ] - } - }, - { - "name": "UpdateChainParamsArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "maxGasDropoff", - "type": "u64" - }, - { - "name": "basePrice", - "type": "u64" - } - ] - } - } - ], - "errors": [ - { - "code": 6001, - "name": "ExceedsUserMaxFee", - "msg": "Relay fees exceeds specified max" - }, - { - "code": 6002, - "name": "ExceedsMaxGasDropoff", - "msg": "Requested gas dropoff exceeds max allowed for chain" - }, - { - "code": 6003, - "name": "InvalidFeeRecipient", - "msg": "The specified fee recipient does not match the address in the instance accound" - }, - { - "code": 6004, - "name": "RelayingToChainDisabled", - "msg": "Relaying to the specified chain is disabled" - }, - { - "code": 6005, - "name": "OutboxItemNotReleased", - "msg": "Relaying to the specified chain is disabled" - }, - { - "code": 6006, - "name": "ScalingOverflow", - "msg": "Scaled value exceeds u64::MAX" - }, - { - "code": 6007, - "name": "DivByZero", - "msg": "Cannot divide by zero" - }, - { - "code": 6257, - "name": "FeeRecipientCannotBeDefault", - "msg": "The fee recipient cannot be the default address (0x0)" - }, - { - "code": 6258, - "name": "NotAuthorized", - "msg": "Must be owner or assistant" - }, - { - "code": 6259, - "name": "PriceCannotBeZero", - "msg": "The price cannot be zero" - } - ] -}; diff --git a/sdk/solana/src/anchor-idl/2_0_0.ts b/sdk/solana/src/anchor-idl/2_0_0.ts deleted file mode 100644 index 0eaf59c94..000000000 --- a/sdk/solana/src/anchor-idl/2_0_0.ts +++ /dev/null @@ -1,15 +0,0 @@ -import ntt from "./2_0_0/example_native_token_transfers.json"; -import quoter from "./2_0_0/ntt_quoter.json"; -import governance from "./2_0_0/wormhole_governance.json"; - -import type { ExampleNativeTokenTransfers } from "./2_0_0/example_native_token_transfers.js"; -import type { NttQuoter } from "./2_0_0/ntt_quoter.js"; -import type { WormholeGovernance } from "./2_0_0/wormhole_governance.js"; - -export namespace _2_0_0 { - export const idl = { ntt, quoter, governance }; - - export type RawExampleNativeTokenTransfers = ExampleNativeTokenTransfers; - export type RawNttQuoter = NttQuoter; - export type RawWormholeGovernance = WormholeGovernance; -} diff --git a/sdk/solana/src/anchor-idl/index.ts b/sdk/solana/src/anchor-idl/index.ts deleted file mode 100644 index 926c925ce..000000000 --- a/sdk/solana/src/anchor-idl/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -export * from "./1_0_0.js"; -export * from "./2_0_0.js"; - -// This is a workaround for the fact that the anchor idl doesn't support generics -// yet. This type is used to remove the generics from the idl types. -export type OmitGenerics = { - [P in keyof T]: T[P] extends Record<"generics", any> - ? never - : T[P] extends object - ? OmitGenerics - : T[P]; -}; diff --git a/sdk/solana/src/bindings.ts b/sdk/solana/src/bindings.ts deleted file mode 100644 index 66e33c1c6..000000000 --- a/sdk/solana/src/bindings.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { IdlAccounts, Program } from "@coral-xyz/anchor"; -import { OmitGenerics, _1_0_0, _2_0_0 } from "./anchor-idl/index.js"; -import { Connection } from "@solana/web3.js"; - -export const IdlVersions = { - "1.0.0": _1_0_0, - "2.0.0": _2_0_0, - default: _2_0_0, -} as const; -export type IdlVersion = keyof typeof IdlVersions; - -export namespace NttBindings { - export type NativeTokenTransfer = - OmitGenerics<_2_0_0.RawExampleNativeTokenTransfers>; - export type Quoter = OmitGenerics<_2_0_0.RawNttQuoter>; - - export type Config = IdlAccounts["config"]; - export type InboxItem = - IdlAccounts["inboxItem"]; -} - -function loadIdlVersion(version: string) { - if (!(version in IdlVersions)) - throw new Error(`Unknown IDL version: ${version}`); - return IdlVersions[version as IdlVersion]; -} - -export const getNttProgram = ( - connection: Connection, - address: string, - version: string = "default" -) => - new Program( - // @ts-ignore - loadIdlVersion(version).idl.ntt, - address, - { connection } - ); - -export const getQuoterProgram = ( - connection: Connection, - address: string, - version: string = "default" -) => - new Program( - // @ts-ignore - loadIdlVersion(version).idl.quoter, - address, - { connection } - ); diff --git a/sdk/solana/src/index.ts b/sdk/solana/src/index.ts deleted file mode 100644 index 62d737a9b..000000000 --- a/sdk/solana/src/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { registerProtocol } from "@wormhole-foundation/sdk-connect"; -import { _platform } from "@wormhole-foundation/sdk-solana"; -import { SolanaNtt } from "./ntt.js"; -import "@wormhole-foundation/sdk-definitions-ntt"; - -registerProtocol(_platform, "Ntt", SolanaNtt); - -export * as idl from "./anchor-idl/index.js"; -export * from "./ntt.js"; diff --git a/sdk/solana/src/ntt.ts b/sdk/solana/src/ntt.ts deleted file mode 100644 index ff478826b..000000000 --- a/sdk/solana/src/ntt.ts +++ /dev/null @@ -1,1089 +0,0 @@ -import { Program, web3 } from "@coral-xyz/anchor"; -import * as splToken from "@solana/spl-token"; -import { - createAssociatedTokenAccountInstruction, - getAssociatedTokenAddressSync, -} from "@solana/spl-token"; -import { - AddressLookupTableAccount, - AddressLookupTableProgram, - Connection, - Keypair, - PublicKey, - SystemProgram, - Transaction, - TransactionInstruction, - TransactionMessage, - VersionedTransaction, -} from "@solana/web3.js"; -import { - AccountAddress, - Chain, - ChainAddress, - ChainsConfig, - Contracts, - NativeAddress, - Network, - TokenAddress, - UnsignedTransaction, - deserializeLayout, - encoding, - toChain, - toChainId, -} from "@wormhole-foundation/sdk-connect"; -import { - Ntt, - WormholeNttTransceiver, -} from "@wormhole-foundation/sdk-definitions-ntt"; -import { - SolanaAddress, - SolanaChains, - SolanaPlatform, - SolanaPlatformType, - SolanaTransaction, - SolanaUnsignedTransaction, -} from "@wormhole-foundation/sdk-solana"; -import { - SolanaWormholeCore, - utils, -} from "@wormhole-foundation/sdk-solana-core"; -import BN from "bn.js"; -import { - BPF_LOADER_UPGRADEABLE_PROGRAM_ID, - TransferArgs, - nttAddresses, - programDataAddress, - programVersionLayout, -} from "./utils.js"; - -import { - IdlVersion, - IdlVersions, - NttBindings, - getNttProgram, -} from "./bindings.js"; -import { NttQuoter } from "./quoter.js"; - -export class SolanaNtt - implements Ntt -{ - core: SolanaWormholeCore; - pdas: ReturnType; - - program: Program; - config?: NttBindings.Config; - quoter?: NttQuoter; - addressLookupTable?: AddressLookupTableAccount; - - constructor( - readonly network: N, - readonly chain: C, - readonly connection: Connection, - readonly contracts: Contracts & { ntt?: Ntt.Contracts }, - readonly idlVersion: IdlVersion = "default" - ) { - if (!contracts.ntt) throw new Error("Ntt contracts not found"); - - this.program = getNttProgram(connection, contracts.ntt.manager, idlVersion); - if (this.contracts.ntt?.quoter) - this.quoter = new NttQuoter(network, chain, connection, this.contracts); - - this.core = new SolanaWormholeCore( - network, - chain, - connection, - contracts - ); - this.pdas = nttAddresses(this.program.programId); - } - - async isRelayingAvailable(destination: Chain): Promise { - if (!this.quoter) return false; - return await this.quoter.isRelayEnabled(destination); - } - - async quoteDeliveryPrice( - destination: Chain, - options: Ntt.TransferOptions - ): Promise { - if (!this.quoter) throw new Error("Quoter not available"); - if (!this.quoter.isRelayEnabled(destination)) - throw new Error("Relay not enabled"); - - return await this.quoter.quoteDeliveryPrice( - destination, - options.gasDropoff - ); - } - - static async fromRpc( - provider: Connection, - config: ChainsConfig - ): Promise> { - const [network, chain] = await SolanaPlatform.chainFromRpc(provider); - const conf = config[chain]!; - - if (conf.network !== network) - throw new Error(`Network mismatch: ${conf.network} != ${network}`); - - if (!("ntt" in conf.contracts)) throw new Error("Ntt contracts not found"); - const ntt = conf.contracts["ntt"]; - - const version = await SolanaNtt._getVersion(ntt.manager, provider); - - return new SolanaNtt( - network as N, - chain, - provider, - { ...conf.contracts, ntt }, - version - ); - } - - async getConfig(): Promise { - this.config = - this.config ?? - (await this.program.account.config.fetch(this.pdas.configAccount())); - return this.config; - } - - async getTokenDecimals(): Promise { - const config = await this.getConfig(); - return await SolanaPlatform.getDecimals( - this.chain, - this.connection, - config.mint - ); - } - - async getCustodyAddress(): Promise { - return (await this.getConfig()).custody.toBase58(); - } - - async getVersion(sender: AccountAddress): Promise { - return await SolanaNtt._getVersion( - this.program.programId.toBase58(), - this.connection, - sender - ); - } - - static async _getVersion( - programAddress: string, - connection: Connection, - sender?: AccountAddress - ): Promise { - // the anchor library has a built-in method to read view functions. However, - // it requires a signer, which would trigger a wallet prompt on the frontend. - // Instead, we manually construct a versioned transaction and call the - // simulate function with sigVerify: false below. - // - // This way, the simulation won't require a signer, but it still requires - // the pubkey of an account that has some lamports in it (since the - // simulation checks if the account has enough money to pay for the transaction). - // - // It's a little unfortunate but it's the best we can do. - - if (!sender) - sender = new SolanaAddress( - // The default pubkey is funded on mainnet and devnet - // we need a funded account to simulate the transaction below - "Hk3SdYTJFpawrvRz4qRztuEt2SqoCG7BGj2yJfDJSFbJ" - ); - - const senderAddress = new SolanaAddress(sender).unwrap(); - - const program = getNttProgram(connection, programAddress); - - const ix = await program.methods.version().accountsStrict({}).instruction(); - const latestBlockHash = - await program.provider.connection.getLatestBlockhash(); - - const msg = new TransactionMessage({ - payerKey: senderAddress, - recentBlockhash: latestBlockHash.blockhash, - instructions: [ix], - }).compileToV0Message(); - - const tx = new VersionedTransaction(msg); - - const txSimulation = await program.provider.connection.simulateTransaction( - tx, - { sigVerify: false } - ); - - const data = encoding.b64.decode(txSimulation.value.returnData?.data[0]!); - const parsed = deserializeLayout(programVersionLayout, data); - const version = encoding.bytes.decode(parsed.version); - if (version in IdlVersions) return version as IdlVersion; - else throw new Error("Unknown IDL version: " + version); - } - - async *initialize(args: { - payer: Keypair; - owner: Keypair; - chain: Chain; - mint: PublicKey; - outboundLimit: bigint; - mode: "burning" | "locking"; - }) { - const mode: any = - args.mode === "burning" ? { burning: {} } : { locking: {} }; - const chainId = toChainId(args.chain); - const mintInfo = await this.program.provider.connection.getAccountInfo( - args.mint - ); - if (mintInfo === null) { - throw new Error( - "Couldn't determine token program. Mint account is null." - ); - } - - const tokenProgram = mintInfo.owner; - const limit = new BN(args.outboundLimit.toString()); - const ix = await this.program.methods - .initialize({ chainId, limit: limit, mode }) - .accountsStrict({ - payer: args.payer.publicKey, - deployer: args.owner.publicKey, - programData: programDataAddress(this.program.programId), - config: this.pdas.configAccount(), - mint: args.mint, - rateLimit: this.pdas.outboxRateLimitAccount(), - tokenProgram, - tokenAuthority: this.pdas.tokenAuthority(), - custody: await this.custodyAccountAddress(args.mint, tokenProgram), - bpfLoaderUpgradeableProgram: BPF_LOADER_UPGRADEABLE_PROGRAM_ID, - associatedTokenProgram: splToken.ASSOCIATED_TOKEN_PROGRAM_ID, - systemProgram: SystemProgram.programId, - }) - .instruction(); - - const tx = new Transaction(); - tx.feePayer = args.payer.publicKey; - tx.add(ix); - yield this.createUnsignedTx( - { transaction: tx, signers: [] }, - "Ntt.Initialize" - ); - - yield* this.initializeOrUpdateLUT({ payer: args.payer }); - } - - // This function should be called after each upgrade. If there's nothing to - // do, it won't actually submit a transaction, so it's cheap to call. - async *initializeOrUpdateLUT(args: { payer: Keypair }) { - // TODO: find a more robust way of fetching a recent slot - const slot = (await this.program.provider.connection.getSlot()) - 1; - - const [_, lutAddress] = web3.AddressLookupTableProgram.createLookupTable({ - authority: this.pdas.lutAuthority(), - payer: args.payer.publicKey, - recentSlot: slot, - }); - - const whAccs = utils.getWormholeDerivedAccounts( - this.program.programId, - this.core.address - ); - const config = await this.getConfig(); - - const entries = { - config: this.pdas.configAccount(), - custody: config.custody, - tokenProgram: config.tokenProgram, - mint: config.mint, - tokenAuthority: this.pdas.tokenAuthority(), - outboxRateLimit: this.pdas.outboxRateLimitAccount(), - wormhole: { - bridge: whAccs.wormholeBridge, - feeCollector: whAccs.wormholeFeeCollector, - sequence: whAccs.wormholeSequence, - program: this.core.address, - systemProgram: SystemProgram.programId, - clock: web3.SYSVAR_CLOCK_PUBKEY, - rent: web3.SYSVAR_RENT_PUBKEY, - }, - }; - - // collect all pubkeys in entries recursively - const collectPubkeys = (obj: any): Array => { - const pubkeys = new Array(); - for (const key in obj) { - const value = obj[key]; - if (value instanceof PublicKey) { - pubkeys.push(value); - } else if (typeof value === "object") { - pubkeys.push(...collectPubkeys(value)); - } - } - return pubkeys; - }; - const pubkeys = collectPubkeys(entries).map((pk) => pk.toBase58()); - - var existingLut: web3.AddressLookupTableAccount | null = null; - try { - existingLut = await this.getAddressLookupTable(false); - } catch { - // swallow errors here, it just means that lut doesn't exist - } - - if (existingLut !== null) { - const existingPubkeys = - existingLut.state.addresses?.map((a) => a.toBase58()) ?? []; - - // if pubkeys contains keys that are not in the existing LUT, we need to - // add them to the LUT - const missingPubkeys = pubkeys.filter( - (pk) => !existingPubkeys.includes(pk) - ); - - if (missingPubkeys.length === 0) { - return existingLut; - } - } - - const ix = await this.program.methods - .initializeLut(new BN(slot)) - .accountsStrict({ - payer: args.payer.publicKey, - authority: this.pdas.lutAuthority(), - lutAddress, - lut: this.pdas.lutAccount(), - lutProgram: AddressLookupTableProgram.programId, - systemProgram: SystemProgram.programId, - entries, - }) - .instruction(); - - const tx = new Transaction().add(ix); - tx.feePayer = args.payer.publicKey; - - yield this.createUnsignedTx({ transaction: tx }, "Ntt.InitializeLUT"); - } - - async *registerTransceiver(args: { - payer: Keypair; - owner: Keypair; - transceiver: PublicKey; - }) { - const config = await this.getConfig(); - if (config.paused) throw new Error("Contract is paused"); - - const ix = await this.program.methods - .registerTransceiver() - .accountsStrict({ - payer: args.payer.publicKey, - owner: args.owner.publicKey, - config: this.pdas.configAccount(), - transceiver: args.transceiver, - registeredTransceiver: this.pdas.registeredTransceiver( - args.transceiver - ), - systemProgram: SystemProgram.programId, - }) - .instruction(); - - const wormholeMessage = Keypair.generate(); - const whAccs = utils.getWormholeDerivedAccounts( - this.program.programId, - this.core.address - ); - const broadcastIx = await this.program.methods - .broadcastWormholeId() - .accountsStrict({ - payer: args.payer.publicKey, - config: this.pdas.configAccount(), - mint: config.mint, - wormholeMessage: wormholeMessage.publicKey, - emitter: this.pdas.emitterAccount(), - wormhole: { - bridge: whAccs.wormholeBridge, - feeCollector: whAccs.wormholeFeeCollector, - sequence: whAccs.wormholeSequence, - program: this.core.address, - systemProgram: SystemProgram.programId, - clock: web3.SYSVAR_CLOCK_PUBKEY, - rent: web3.SYSVAR_RENT_PUBKEY, - }, - }) - .instruction(); - - const tx = new Transaction(); - tx.feePayer = args.payer.publicKey; - tx.add(ix, broadcastIx); - yield this.createUnsignedTx( - { transaction: tx, signers: [wormholeMessage] }, - "Ntt.RegisterTransceiver" - ); - } - - async *setWormholeTransceiverPeer( - peer: ChainAddress, - payer: AccountAddress - ) { - const sender = new SolanaAddress(payer).unwrap(); - const wormholeMessage = Keypair.generate(); - const whAccs = utils.getWormholeDerivedAccounts( - this.program.programId, - this.core.address - ); - - const [setPeerIx, broadcastIx] = await Promise.all([ - this.program.methods - .setWormholePeer({ - chainId: { id: toChainId(peer.chain) }, - address: Array.from(peer.address.toUniversalAddress().toUint8Array()), - }) - .accountsStrict({ - payer: sender, - owner: sender, - config: this.pdas.configAccount(), - peer: this.pdas.transceiverPeerAccount(peer.chain), - systemProgram: SystemProgram.programId, - }) - .instruction(), - this.program.methods - .broadcastWormholePeer({ chainId: toChainId(peer.chain) }) - .accountsStrict({ - payer: sender, - config: this.pdas.configAccount(), - peer: this.pdas.transceiverPeerAccount(peer.chain), - wormholeMessage: wormholeMessage.publicKey, - emitter: this.pdas.emitterAccount(), - wormhole: { - bridge: whAccs.wormholeBridge, - feeCollector: whAccs.wormholeFeeCollector, - sequence: whAccs.wormholeSequence, - program: this.core.address, - clock: web3.SYSVAR_CLOCK_PUBKEY, - rent: web3.SYSVAR_RENT_PUBKEY, - systemProgram: SystemProgram.programId, - }, - }) - .instruction(), - ]); - - const tx = new Transaction(); - tx.feePayer = sender; - tx.add(setPeerIx, broadcastIx); - - yield this.createUnsignedTx( - { - transaction: tx, - signers: [wormholeMessage], - }, - "Ntt.SetWormholeTransceiverPeer" - ); - } - - async *setPeer( - peer: ChainAddress, - tokenDecimals: number, - inboundLimit: bigint, - payer: AccountAddress - ) { - const sender = new SolanaAddress(payer).unwrap(); - - const ix = await this.program.methods - .setPeer({ - chainId: { id: toChainId(peer.chain) }, - address: Array.from(peer.address.toUniversalAddress().toUint8Array()), - limit: new BN(inboundLimit.toString()), - tokenDecimals: tokenDecimals, - }) - .accountsStrict({ - payer: sender, - owner: sender, - config: this.pdas.configAccount(), - peer: this.pdas.peerAccount(peer.chain), - inboxRateLimit: this.pdas.inboxRateLimitAccount(peer.chain), - systemProgram: SystemProgram.programId, - }) - .instruction(); - - const tx = new Transaction(); - tx.feePayer = sender; - tx.add(ix); - yield this.createUnsignedTx({ transaction: tx }, "Ntt.SetPeer"); - } - - async *transfer( - sender: AccountAddress, - amount: bigint, - destination: ChainAddress, - options: Ntt.TransferOptions, - outboxItem?: Keypair - ): AsyncGenerator, any, unknown> { - const config = await this.getConfig(); - if (config.paused) throw new Error("Contract is paused"); - - outboxItem = outboxItem ?? Keypair.generate(); - - const senderAddress = new SolanaAddress(sender).unwrap(); - const fromAuthority = senderAddress; - const from = getAssociatedTokenAddressSync(config.mint, fromAuthority); - - const transferArgs: TransferArgs = { - amount: amount, - recipient: destination, - shouldQueue: options.queue, - }; - - const txArgs = { - transferArgs, - payer: senderAddress, - from, - fromAuthority, - outboxItem: outboxItem.publicKey, - config, - }; - - const [approveIx, transferIx, releaseIx] = await Promise.all([ - splToken.createApproveInstruction( - from, - this.pdas.sessionAuthority(fromAuthority, transferArgs), - fromAuthority, - amount - ), - config.mode.locking != null - ? this.createTransferLockInstruction(txArgs) - : this.createTransferBurnInstruction(txArgs), - this.createReleaseOutboundInstruction({ - payer: senderAddress, - outboxItem: outboxItem.publicKey, - revertOnDelay: !options.queue, - }), - ]); - - const tx = new Transaction(); - tx.feePayer = senderAddress; - tx.add(approveIx, transferIx, releaseIx); - - if (options.automatic) { - if (!this.quoter) - throw new Error( - "No quoter available, cannot initiate an automatic transfer." - ); - - const fee = await this.quoteDeliveryPrice(destination.chain, options); - const relayIx = await this.quoter.createRequestRelayInstruction( - senderAddress, - outboxItem.publicKey, - this.program.programId, - destination.chain, - new BN(fee.toString()), - new BN((options.gasDropoff ?? 0n).toString()) - ); - tx.add(relayIx); - } - - yield this.createUnsignedTx( - { transaction: tx, signers: [outboxItem] }, - "Ntt.Transfer" - ); - } - - private async *createAta(sender: AccountAddress, mint: PublicKey) { - const senderAddress = new SolanaAddress(sender).unwrap(); - const ata = getAssociatedTokenAddressSync(mint, senderAddress); - - // If the ata doesn't exist yet, create it - const acctInfo = await this.connection.getAccountInfo(ata); - if (acctInfo === null) { - const transaction = new Transaction().add( - createAssociatedTokenAccountInstruction( - senderAddress, - ata, - senderAddress, - mint - ) - ); - transaction.feePayer = senderAddress; - yield this.createUnsignedTx({ transaction }, "Redeem.CreateATA"); - } - } - - async *redeem(attestations: Ntt.Attestation[], payer: AccountAddress) { - const config = await this.getConfig(); - if (config.paused) throw new Error("Contract is paused"); - - // TODO: not this, we should iterate over the set of enabled xcvrs? - // if (attestations.length !== this.xcvrs.length) throw "No"; - const wormholeNTT = attestations[0]! as WormholeNttTransceiver.VAA; - - // Create the vaa if necessary - yield* this.createAta(payer, config.mint); - - // Post the VAA that we intend to redeem - yield* this.core.postVaa(payer, wormholeNTT); - - const senderAddress = new SolanaAddress(payer).unwrap(); - const nttMessage = wormholeNTT.payload.nttManagerPayload; - const emitterChain = wormholeNTT.emitterChain; - - const releaseArgs = { - payer: senderAddress, - config, - nttMessage, - recipient: new PublicKey( - nttMessage.payload.recipientAddress.toUint8Array() - ), - chain: emitterChain, - revertOnDelay: false, - }; - - const [receiveMessageIx, redeemIx, releaseIx] = await Promise.all([ - this.createReceiveWormholeMessageInstruction(senderAddress, wormholeNTT), - this.createRedeemInstruction(senderAddress, wormholeNTT), - config.mode.locking != null - ? this.createReleaseInboundUnlockInstruction(releaseArgs) - : this.createReleaseInboundMintInstruction(releaseArgs), - ]); - - const tx = new Transaction(); - tx.feePayer = senderAddress; - tx.add(receiveMessageIx, redeemIx, releaseIx); - yield this.createUnsignedTx({ transaction: tx }, "Ntt.Redeem"); - } - - async getCurrentOutboundCapacity(): Promise { - const rl = await this.program.account.outboxRateLimit.fetch( - this.pdas.outboxRateLimitAccount() - ); - return BigInt(rl.rateLimit.capacityAtLastTx.toString()); - } - - async getCurrentInboundCapacity(fromChain: Chain): Promise { - const rl = await this.program.account.inboxRateLimit.fetch( - this.pdas.inboxRateLimitAccount(fromChain) - ); - return BigInt(rl.rateLimit.capacityAtLastTx.toString()); - } - - async getIsExecuted(attestation: Ntt.Attestation): Promise { - if (!this.getIsApproved(attestation)) return false; - - const { emitterChain } = attestation as WormholeNttTransceiver.VAA; - const inboundQueued = await this.getInboundQueuedTransfer( - emitterChain, - attestation - ); - - return inboundQueued === null; - } - - async getIsApproved(attestation: Ntt.Attestation): Promise { - const digest = (attestation as WormholeNttTransceiver.VAA).hash; - const vaaAddress = utils.derivePostedVaaKey( - this.core.address, - Buffer.from(digest) - ); - - try { - const info = this.connection.getAccountInfo(vaaAddress); - return info !== null; - } catch (_) {} - - return false; - } - - async *completeInboundQueuedTransfer( - fromChain: Chain, - transceiverMessage: Ntt.Message, - token: TokenAddress, - payer: AccountAddress - ) { - const config = await this.getConfig(); - if (config.paused) throw new Error("Contract is paused"); - - const senderAddress = new SolanaAddress(payer).unwrap(); - const tx = new Transaction(); - tx.feePayer = senderAddress; - const releaseArgs = { - payer: senderAddress, - config, - nttMessage: transceiverMessage, - recipient: new PublicKey( - transceiverMessage.payload.recipientAddress.toUint8Array() - ), - chain: fromChain, - revertOnDelay: false, - }; - - tx.add( - await (config.mode.locking != null - ? this.createReleaseInboundUnlockInstruction(releaseArgs) - : this.createReleaseInboundMintInstruction(releaseArgs)) - ); - - yield this.createUnsignedTx( - { transaction: tx }, - "Ntt.CompleteInboundTransfer" - ); - } - - async getInboundQueuedTransfer( - chain: Chain, - nttMessage: Ntt.Message - ): Promise | null> { - const inboxItem = await this.program.account.inboxItem.fetch( - this.pdas.inboxItemAccount(chain, nttMessage) - ); - if (!inboxItem) return null; - - const { recipientAddress, amount, releaseStatus } = inboxItem!; - const rateLimitExpiry = releaseStatus.releaseAfter - ? releaseStatus.releaseAfter[0].toNumber() - : 0; - - const xfer: Ntt.InboundQueuedTransfer = { - recipient: new SolanaAddress(recipientAddress) as NativeAddress, - amount: BigInt(amount.toString()), - rateLimitExpiryTimestamp: rateLimitExpiry, - }; - - return xfer; - } - - async createTransferLockInstruction(args: { - transferArgs: TransferArgs; - payer: PublicKey; - from: PublicKey; - fromAuthority: PublicKey; - outboxItem: PublicKey; - config?: NttBindings.Config; - }): Promise { - const config = await this.getConfig(); - if (config.paused) throw new Error("Contract is paused"); - - const sessionAuthority = this.pdas.sessionAuthority( - args.fromAuthority, - args.transferArgs - ); - - const recipientChain = args.transferArgs.recipient.chain; - return await this.program.methods - .transferLock({ - recipientChain: { id: toChainId(recipientChain) }, - amount: new BN(args.transferArgs.amount.toString()), - recipientAddress: Array.from( - args.transferArgs.recipient.address - .toUniversalAddress() - .toUint8Array() - ), - shouldQueue: args.transferArgs.shouldQueue, - }) - .accountsStrict({ - common: { - payer: args.payer, - config: { config: this.pdas.configAccount() }, - mint: config.mint, - from: args.from, - tokenProgram: config.tokenProgram, - outboxItem: args.outboxItem, - outboxRateLimit: this.pdas.outboxRateLimitAccount(), - systemProgram: SystemProgram.programId, - custody: config.custody, - }, - peer: this.pdas.peerAccount(recipientChain), - inboxRateLimit: this.pdas.inboxRateLimitAccount(recipientChain), - sessionAuthority: sessionAuthority, - }) - .instruction(); - } - - async createTransferBurnInstruction(args: { - transferArgs: TransferArgs; - payer: PublicKey; - from: PublicKey; - fromAuthority: PublicKey; - outboxItem: PublicKey; - config?: NttBindings.Config; - }): Promise { - const config = await this.getConfig(); - if (config.paused) throw new Error("Contract is paused"); - - const recipientChain = toChain(args.transferArgs.recipient.chain); - return await this.program.methods - .transferBurn({ - recipientChain: { id: toChainId(recipientChain) }, - amount: new BN(args.transferArgs.amount.toString()), - recipientAddress: Array.from( - args.transferArgs.recipient.address - .toUniversalAddress() - .toUint8Array() - ), - shouldQueue: args.transferArgs.shouldQueue, - }) - .accountsStrict({ - common: { - payer: args.payer, - config: { config: this.pdas.configAccount() }, - mint: config.mint, - from: args.from, - outboxItem: args.outboxItem, - outboxRateLimit: this.pdas.outboxRateLimitAccount(), - custody: config.custody, - tokenProgram: config.tokenProgram, - systemProgram: SystemProgram.programId, - }, - peer: this.pdas.peerAccount(recipientChain), - inboxRateLimit: this.pdas.inboxRateLimitAccount(recipientChain), - sessionAuthority: this.pdas.sessionAuthority( - args.fromAuthority, - args.transferArgs - ), - tokenAuthority: this.pdas.tokenAuthority(), - }) - .instruction(); - } - - async createReleaseOutboundInstruction(args: { - payer: PublicKey; - outboxItem: PublicKey; - revertOnDelay: boolean; - }): Promise { - const whAccs = utils.getWormholeDerivedAccounts( - this.program.programId, - this.core.address - ); - - return await this.program.methods - .releaseWormholeOutbound({ - revertOnDelay: args.revertOnDelay, - }) - .accountsStrict({ - payer: args.payer, - config: { config: this.pdas.configAccount() }, - outboxItem: args.outboxItem, - wormholeMessage: this.pdas.wormholeMessageAccount(args.outboxItem), - emitter: whAccs.wormholeEmitter, - transceiver: this.pdas.registeredTransceiver(this.program.programId), - wormhole: { - bridge: whAccs.wormholeBridge, - feeCollector: whAccs.wormholeFeeCollector, - sequence: whAccs.wormholeSequence, - program: this.core.address, - systemProgram: SystemProgram.programId, - clock: web3.SYSVAR_CLOCK_PUBKEY, - rent: web3.SYSVAR_RENT_PUBKEY, - }, - }) - .instruction(); - } - - async createReceiveWormholeMessageInstruction( - payer: PublicKey, - wormholeNTT: WormholeNttTransceiver.VAA - ): Promise { - const config = await this.getConfig(); - if (config.paused) throw new Error("Contract is paused"); - - const nttMessage = wormholeNTT.payload.nttManagerPayload; - const emitterChain = wormholeNTT.emitterChain; - return await this.program.methods - .receiveWormholeMessage() - .accountsStrict({ - payer: payer, - config: { config: this.pdas.configAccount() }, - peer: this.pdas.transceiverPeerAccount(emitterChain), - vaa: utils.derivePostedVaaKey( - this.core.address, - Buffer.from(wormholeNTT.hash) - ), - transceiverMessage: this.pdas.transceiverMessageAccount( - emitterChain, - nttMessage.id - ), - systemProgram: SystemProgram.programId, - }) - .instruction(); - } - - async createRedeemInstruction( - payer: PublicKey, - wormholeNTT: WormholeNttTransceiver.VAA - ): Promise { - const config = await this.getConfig(); - if (config.paused) throw new Error("Contract is paused"); - - const nttMessage = wormholeNTT.payload.nttManagerPayload; - const emitterChain = wormholeNTT.emitterChain; - - const nttManagerPeer = this.pdas.peerAccount(emitterChain); - const inboxRateLimit = this.pdas.inboxRateLimitAccount(emitterChain); - const inboxItem = this.pdas.inboxItemAccount(emitterChain, nttMessage); - - return await this.program.methods - .redeem({}) - .accountsStrict({ - payer: payer, - config: this.pdas.configAccount(), - peer: nttManagerPeer, - transceiverMessage: this.pdas.transceiverMessageAccount( - emitterChain, - nttMessage.id - ), - transceiver: this.pdas.registeredTransceiver(this.program.programId), - mint: config.mint, - inboxItem, - inboxRateLimit, - outboxRateLimit: this.pdas.outboxRateLimitAccount(), - systemProgram: SystemProgram.programId, - }) - .instruction(); - } - - async createReleaseInboundMintInstruction(args: { - payer: PublicKey; - chain: Chain; - nttMessage: Ntt.Message; - revertOnDelay: boolean; - recipient?: PublicKey; - }): Promise { - const config = await this.getConfig(); - if (config.paused) throw new Error("Contract is paused"); - - const inboxItem = this.pdas.inboxItemAccount(args.chain, args.nttMessage); - - const recipientAddress = - args.recipient ?? - (await this.getInboundQueuedTransfer( - args.chain, - args.nttMessage - ))!.recipient - .toNative(this.chain) - .unwrap(); - - return await this.program.methods - .releaseInboundMint({ - revertOnDelay: args.revertOnDelay, - }) - .accountsStrict({ - common: { - payer: args.payer, - config: { config: this.pdas.configAccount() }, - inboxItem, - recipient: getAssociatedTokenAddressSync( - config.mint, - recipientAddress - ), - mint: config.mint, - tokenAuthority: this.pdas.tokenAuthority(), - custody: config.custody, - tokenProgram: config.tokenProgram, - }, - }) - .instruction(); - } - - async createReleaseInboundUnlockInstruction(args: { - payer: PublicKey; - chain: Chain; - nttMessage: Ntt.Message; - revertOnDelay: boolean; - recipient?: PublicKey; - }): Promise { - const config = await this.getConfig(); - if (config.paused) throw new Error("Contract is paused"); - - const recipientAddress = - args.recipient ?? - (await this.getInboundQueuedTransfer( - args.chain, - args.nttMessage - ))!.recipient - .toNative(this.chain) - .unwrap(); - - const inboxItem = this.pdas.inboxItemAccount(args.chain, args.nttMessage); - - return await this.program.methods - .releaseInboundUnlock({ - revertOnDelay: args.revertOnDelay, - }) - .accountsStrict({ - common: { - payer: args.payer, - config: { config: this.pdas.configAccount() }, - inboxItem: inboxItem, - recipient: getAssociatedTokenAddressSync( - config.mint, - recipientAddress - ), - mint: config.mint, - tokenAuthority: this.pdas.tokenAuthority(), - custody: config.custody, - tokenProgram: config.tokenProgram, - }, - }) - .instruction(); - } - - /** - * Returns the address of the custody account. If the config is available - * (i.e. the program is initialised), the mint is derived from the config. - * Otherwise, the mint must be provided. - */ - async custodyAccountAddress( - configOrMint: NttBindings.Config | PublicKey, - tokenProgram = splToken.TOKEN_PROGRAM_ID - ): Promise { - if (configOrMint instanceof PublicKey) { - return splToken.getAssociatedTokenAddress( - configOrMint, - this.pdas.tokenAuthority(), - true, - tokenProgram - ); - } else { - return splToken.getAssociatedTokenAddress( - configOrMint.mint, - this.pdas.tokenAuthority(), - true, - configOrMint.tokenProgram - ); - } - } - - async getAddressLookupTable( - useCache = true - ): Promise { - if (!useCache || !this.addressLookupTable) { - const lut = await this.program.account.lut.fetchNullable( - this.pdas.lutAccount() - ); - if (!lut) - throw new Error( - "Address lookup table not found. Did you forget to call initializeLUT?" - ); - - const response = await this.connection.getAddressLookupTable(lut.address); - if (response.value === null) throw new Error("Could not fetch LUT"); - - this.addressLookupTable = response.value; - } - - if (!this.addressLookupTable) - throw new Error( - "Address lookup table not found. Did you forget to call initializeLUT?" - ); - - return this.addressLookupTable; - } - - createUnsignedTx( - txReq: SolanaTransaction, - description: string, - parallelizable: boolean = false - ): SolanaUnsignedTransaction { - return new SolanaUnsignedTransaction( - txReq, - this.network, - this.chain, - description, - parallelizable - ); - } -} diff --git a/sdk/solana/src/quoter.ts b/sdk/solana/src/quoter.ts deleted file mode 100644 index 7d9f70320..000000000 --- a/sdk/solana/src/quoter.ts +++ /dev/null @@ -1,155 +0,0 @@ -import { BN, Program } from "@coral-xyz/anchor"; -import { - Connection, - LAMPORTS_PER_SOL, - PublicKey, - SystemProgram, -} from "@solana/web3.js"; -import { - Chain, - Contracts, - Network, - amount, - chainToPlatform, -} from "@wormhole-foundation/sdk"; -import { Ntt } from "@wormhole-foundation/sdk-definitions-ntt"; -import { IdlVersion, NttBindings, getQuoterProgram } from "./bindings.js"; -import { U64, quoterAddresses } from "./utils.js"; - -//constants that must match ntt-quoter lib.rs / implementation: -const USD_UNIT = 1e6; -const WEI_PER_GWEI = 1e9; -const GWEI_PER_ETH = 1e9; - -export class NttQuoter { - program: Program; - pdas: ReturnType; - - instance: PublicKey; - nttProgramId: PublicKey; - - constructor( - readonly network: N, - readonly chain: C, - readonly connection: Connection, - readonly contracts: Contracts & { ntt?: Ntt.Contracts }, - readonly idlVersion: IdlVersion = "default" - ) { - if (!contracts.ntt?.quoter) throw new Error("No quoter program found"); - this.program = getQuoterProgram(connection, contracts.ntt.quoter); - this.pdas = quoterAddresses(this.program.programId); - this.nttProgramId = new PublicKey(contracts.ntt.manager); - this.instance = this.pdas.instanceAccount(); - } - - async isRelayEnabled(destination: Chain) { - try { - const { paused } = await this.getRegisteredChain(destination); - return !paused; - } catch (e: any) { - if (e.message?.includes("Account does not exist")) { - return false; - } - throw e; - } - } - - /** - * Estimate the cost of a relay request - * @param chain The destination chain - * @param gasDropoff The amount of native gas to end up with on the destination chain - * @returns The estimated cost in lamports - */ - async quoteDeliveryPrice(chain: Chain, gasDropoff?: bigint) { - if (chainToPlatform(chain) !== "Evm") - throw new Error("Only EVM chains are supported"); - - // Convert to decimal number since we're multiplying other numbers - const gasDropoffEth = amount.whole( - amount.fromBaseUnits(gasDropoff ?? 0n, 18) - ); - - const [chainData, instanceData, nttData, rentCost] = await Promise.all([ - this.getRegisteredChain(chain), - this.getInstance(), - this.getRegisteredNtt(), - this.program.provider.connection.getMinimumBalanceForRentExemption( - this.program.account.relayRequest.size - ), - ]); - - if (chainData.nativePriceUsd === 0) throw new Error("Native price is 0"); - if (instanceData.solPriceUsd === 0) throw new Error("SOL price is 0"); - if (gasDropoffEth > chainData.maxGasDropoffEth) - throw new Error("Requested gas dropoff exceeds allowed maximum"); - - const totalNativeGasCostUsd = - chainData.nativePriceUsd * - (gasDropoffEth + - (chainData.gasPriceGwei * nttData.gasCost) / GWEI_PER_ETH); - - const totalCostSol = - rentCost / LAMPORTS_PER_SOL + - (chainData.basePriceUsd + totalNativeGasCostUsd) / - instanceData.solPriceUsd; - - // Add 5% to account for possible price updates while the tx is in flight - return BigInt(U64.to(totalCostSol * 1.05, LAMPORTS_PER_SOL).toString()); - } - - async createRequestRelayInstruction( - payer: PublicKey, - outboxItem: PublicKey, - nttProgramId: PublicKey, - chain: Chain, - maxFee: BN, - gasDropoff: BN - ) { - return this.program.methods - .requestRelay({ maxFee, gasDropoff }) - .accounts({ - payer, - instance: this.instance, - registeredChain: this.pdas.registeredChainAccount(chain), - registeredNtt: this.pdas.registeredNttAccount(nttProgramId), - outboxItem, - relayRequest: this.pdas.relayRequestAccount(outboxItem), - systemProgram: SystemProgram.programId, - }) - .instruction(); - } - - async getInstance() { - const data = await this.program.account.instance.fetch(this.instance); - return { - owner: data.owner, - assistant: data.assistant, - feeRecipient: data.feeRecipient, - solPriceUsd: U64.from(data.solPrice, USD_UNIT), - }; - } - - async getRegisteredNtt() { - const data = await this.program.account.registeredNtt.fetch( - this.pdas.registeredNttAccount(this.nttProgramId) - ); - return { - gasCost: data.gasCost, - wormholeTransceiverIndex: data.wormholeTransceiverIndex, - }; - } - - async getRegisteredChain(chain: Chain) { - const data = await this.program.account.registeredChain.fetch( - this.pdas.registeredChainAccount(chain) - ); - - return { - paused: data.basePrice.eq(U64.MAX), - maxGasDropoffEth: U64.from(data.maxGasDropoff, GWEI_PER_ETH), - basePriceUsd: U64.from(data.basePrice, USD_UNIT), - nativePriceUsd: U64.from(data.nativePrice, USD_UNIT), - gasPriceGwei: U64.from(data.gasPrice, WEI_PER_GWEI), - }; - } -} diff --git a/sdk/solana/tsconfig.cjs.json b/sdk/solana/tsconfig.cjs.json deleted file mode 100644 index 0dd1e5a2b..000000000 --- a/sdk/solana/tsconfig.cjs.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../tsconfig.cjs.json", - "include": ["src/**/*.ts", "src/**/*.json"], - "compilerOptions": { - "outDir": "dist/cjs", - "rootDir": "src", - "resolveJsonModule": true - } -} diff --git a/sdk/solana/tsconfig.esm.json b/sdk/solana/tsconfig.esm.json deleted file mode 100644 index decfccc69..000000000 --- a/sdk/solana/tsconfig.esm.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../tsconfig.esm.json", - "include": ["src/**/*.ts", "src/**/*.json"], - "compilerOptions": { - "outDir": "dist/esm", - "rootDir": "src", - "resolveJsonModule": true - } -} diff --git a/sdk/syncVersion.ts b/sdk/syncVersion.ts index effd0dbae..efed5843b 100644 --- a/sdk/syncVersion.ts +++ b/sdk/syncVersion.ts @@ -24,7 +24,7 @@ function updateVersionInPackageJson( } function getVersion(dir: string): string { - const versionFilePath = path.join(dir, "VERSION"); + const versionFilePath = path.join(dir, "sdk/VERSION"); const v = fs.readFileSync(versionFilePath); return v.toString().replace("\n", ""); } diff --git a/sdk/tsconfig.cjs.json b/sdk/tsconfig.cjs.json index cc9ea9df8..e3ce6ec4e 100644 --- a/sdk/tsconfig.cjs.json +++ b/sdk/tsconfig.cjs.json @@ -1,5 +1,5 @@ { - "extends": "./tsconfig.json", + "extends": "../tsconfig.json", "compilerOptions": { "module": "CommonJS", "moduleResolution": "Node" diff --git a/sdk/tsconfig.esm.json b/sdk/tsconfig.esm.json index 1c8cf919e..014552d8c 100644 --- a/sdk/tsconfig.esm.json +++ b/sdk/tsconfig.esm.json @@ -1,5 +1,5 @@ { - "extends": "./tsconfig.json", + "extends": "../tsconfig.json", "compilerOptions": { "module": "NodeNext", "moduleResolution": "NodeNext" diff --git a/solana/.gitignore b/solana/.gitignore index cb6711175..f804c0bf5 100644 --- a/solana/.gitignore +++ b/solana/.gitignore @@ -2,3 +2,4 @@ **/*.rs.bk node_modules test-ledger +dist \ No newline at end of file diff --git a/solana/Anchor.toml b/solana/Anchor.toml index fa62d51a1..7554a6de7 100644 --- a/solana/Anchor.toml +++ b/solana/Anchor.toml @@ -16,11 +16,11 @@ wormhole_governance = "wgvEiKVzX9yyEoh41jZAdC6JqGUTS4CFXbFGBV5TKdZ" url = "https://api.apr.dev" [provider] -cluster = "Localnet" +cluster = "localnet" wallet = "keys/test.json" [scripts] -test = "yarn --cwd ../sdk/solana test:ci" +test = "npm run test:ci" [test] startup_wait = 5000 diff --git a/solana/Dockerfile b/solana/Dockerfile index e4aed9261..992152d4e 100644 --- a/solana/Dockerfile +++ b/solana/Dockerfile @@ -38,6 +38,11 @@ COPY --from=solana-contract /opt/solana/deps/mpl_token_metadata.so /opt/solana/d COPY --from=solana-contract /opt/solana/deps/wormhole_migration.so /opt/solana/deps/wormhole_migration.so COPY sdk ../sdk +COPY solana/ts ts +COPY solana/package.json package.json +COPY solana/tsconfig.esm.json tsconfig.esm.json +COPY solana/tsconfig.cjs.json tsconfig.cjs.json +COPY solana/tsconfig.anchor.json tsconfig.anchor.json COPY solana/Makefile Makefile COPY solana/scripts scripts diff --git a/solana/Makefile b/solana/Makefile index 1389adfea..2b2682543 100644 --- a/solana/Makefile +++ b/solana/Makefile @@ -1,36 +1,41 @@ -.PHONY: build -build: _anchor-build target/idl/example_native_token_transfers.json idl +.DEFAULT_GOAL = build +.PHONY: build test idl sdk clean -# remove the generics from the idl file. This is necessary as of anchor 0.29.0, because -# the javascript library does not support generics yet, and just panics -.PHONY: target/idl/example_native_token_transfers.json -target/idl/example_native_token_transfers.json: _anchor-build - @echo "Removing generics from $@" - @ ./scripts/patch-idl $@ +#find and convert version line: +# turn `const VERSION: &str = "major.minor.patch";` into `major_minor_patch` +#use make functions to minimize dependence on shell +VERSION = $(subst .,_,$(subst ;,,$(subst ",,$(lastword \ + $(shell grep "const VERSION" programs/example-native-token-transfers/src/lib.rs) \ +)))) -.PHONY: anchor-build -_anchor-build: - @anchor build --arch sbf +# after building, remove the generics from the idl file. This is necessary as of anchor 0.29.0, +# because the javascript library does not support generics yet, and just panics +build: + anchor build --arch sbf + @echo "Removing generics from target/idl/example_native_token_transfers.json" + ./scripts/patch-idl target/idl/example_native_token_transfers.json -anchor-test: node_modules build target/idl/example_native_token_transfers.json sdk + +test: idl sdk node_modules anchor test --skip-build +idl: build + @echo "IDL Version: $(VERSION)" + mkdir -p ts/idl/$(VERSION)/json + mkdir -p ts/idl/$(VERSION)/ts + cp -r target/idl/* ts/idl/$(VERSION)/json/ + for jsonfile in ts/idl/$(VERSION)/json/*.json; do \ + tsfile=$$(echo $$jsonfile | sed 's/json\/\(.*\)\.json/ts\/\1.ts/'); \ + tsx scripts/regenerateIdl.ts $$jsonfile > $$tsfile; \ + done + sdk: build @echo "Building SDK" - cd ../sdk && npm ci && npm run build:solana - -.PHONY: idl -idl: target/idl/example_native_token_transfers.json - @ mkdir -p $@/json - @ mkdir -p $@/ts - @ cp -r target/idl/* $@/json/ - @ cp -r target/types/* $@/ts/ - @ cd ../sdk/solana && npm run generate + cd .. && npm ci && npm run build:solana -node_modules: package-lock.json - npm ci - -.PHONY: clean clean: anchor clean rm -rf .anchor node_modules + +node_modules: + npm install \ No newline at end of file diff --git a/solana/idl/json/example_native_token_transfers.json b/solana/idl/json/example_native_token_transfers.json deleted file mode 100644 index 82369389d..000000000 --- a/solana/idl/json/example_native_token_transfers.json +++ /dev/null @@ -1,1932 +0,0 @@ -{ - "version": "2.0.0", - "name": "example_native_token_transfers", - "instructions": [ - { - "name": "initialize", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "deployer", - "isMut": false, - "isSigner": true - }, - { - "name": "programData", - "isMut": false, - "isSigner": false - }, - { - "name": "config", - "isMut": true, - "isSigner": false - }, - { - "name": "mint", - "isMut": false, - "isSigner": false - }, - { - "name": "rateLimit", - "isMut": true, - "isSigner": false - }, - { - "name": "tokenAuthority", - "isMut": false, - "isSigner": false - }, - { - "name": "custody", - "isMut": true, - "isSigner": false, - "docs": [ - "The custody account that holds tokens in locking mode and temporarily", - "holds tokens in burning mode.", - "function if the token account has already been created." - ] - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "associated token account for the given mint." - ] - }, - { - "name": "associatedTokenProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "bpfLoaderUpgradeableProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "InitializeArgs" - } - } - ] - }, - { - "name": "initializeLut", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "authority", - "isMut": false, - "isSigner": false - }, - { - "name": "lutAddress", - "isMut": true, - "isSigner": false - }, - { - "name": "lut", - "isMut": true, - "isSigner": false - }, - { - "name": "lutProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "entries", - "accounts": [ - { - "name": "config", - "isMut": false, - "isSigner": false - }, - { - "name": "custody", - "isMut": false, - "isSigner": false - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "mint", - "isMut": false, - "isSigner": false - }, - { - "name": "tokenAuthority", - "isMut": false, - "isSigner": false - }, - { - "name": "outboxRateLimit", - "isMut": false, - "isSigner": false - }, - { - "name": "wormhole", - "accounts": [ - { - "name": "bridge", - "isMut": true, - "isSigner": false - }, - { - "name": "feeCollector", - "isMut": true, - "isSigner": false - }, - { - "name": "sequence", - "isMut": true, - "isSigner": false - }, - { - "name": "program", - "isMut": false, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "clock", - "isMut": false, - "isSigner": false - }, - { - "name": "rent", - "isMut": false, - "isSigner": false - } - ] - } - ] - } - ], - "args": [ - { - "name": "recentSlot", - "type": "u64" - } - ] - }, - { - "name": "version", - "accounts": [], - "args": [], - "returns": "string" - }, - { - "name": "transferBurn", - "accounts": [ - { - "name": "common", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "config", - "accounts": [ - { - "name": "config", - "isMut": false, - "isSigner": false - } - ] - }, - { - "name": "mint", - "isMut": true, - "isSigner": false - }, - { - "name": "from", - "isMut": true, - "isSigner": false, - "docs": [ - "account can spend these tokens." - ] - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "outboxItem", - "isMut": true, - "isSigner": true - }, - { - "name": "outboxRateLimit", - "isMut": true, - "isSigner": false - }, - { - "name": "custody", - "isMut": true, - "isSigner": false, - "docs": [ - "Tokens are always transferred to the custody account first regardless of", - "the mode.", - "For an explanation, see the note in [`transfer_burn`]." - ] - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ] - }, - { - "name": "inboxRateLimit", - "isMut": true, - "isSigner": false - }, - { - "name": "peer", - "isMut": false, - "isSigner": false - }, - { - "name": "sessionAuthority", - "isMut": false, - "isSigner": false, - "docs": [ - "See [`crate::SESSION_AUTHORITY_SEED`] for an explanation of the flow." - ] - }, - { - "name": "tokenAuthority", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "TransferArgs" - } - } - ] - }, - { - "name": "transferLock", - "accounts": [ - { - "name": "common", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "config", - "accounts": [ - { - "name": "config", - "isMut": false, - "isSigner": false - } - ] - }, - { - "name": "mint", - "isMut": true, - "isSigner": false - }, - { - "name": "from", - "isMut": true, - "isSigner": false, - "docs": [ - "account can spend these tokens." - ] - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "outboxItem", - "isMut": true, - "isSigner": true - }, - { - "name": "outboxRateLimit", - "isMut": true, - "isSigner": false - }, - { - "name": "custody", - "isMut": true, - "isSigner": false, - "docs": [ - "Tokens are always transferred to the custody account first regardless of", - "the mode.", - "For an explanation, see the note in [`transfer_burn`]." - ] - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ] - }, - { - "name": "inboxRateLimit", - "isMut": true, - "isSigner": false - }, - { - "name": "peer", - "isMut": false, - "isSigner": false - }, - { - "name": "sessionAuthority", - "isMut": false, - "isSigner": false, - "docs": [ - "See [`crate::SESSION_AUTHORITY_SEED`] for an explanation of the flow." - ] - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "TransferArgs" - } - } - ] - }, - { - "name": "redeem", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "config", - "isMut": false, - "isSigner": false - }, - { - "name": "peer", - "isMut": false, - "isSigner": false - }, - { - "name": "transceiverMessage", - "isMut": false, - "isSigner": false - }, - { - "name": "transceiver", - "isMut": false, - "isSigner": false - }, - { - "name": "mint", - "isMut": false, - "isSigner": false - }, - { - "name": "inboxItem", - "isMut": true, - "isSigner": false, - "docs": [ - "NOTE: This account is content-addressed (PDA seeded by the message hash).", - "This is because in a multi-transceiver configuration, the different", - "transceivers \"vote\" on messages (by delivering them). By making the inbox", - "items content-addressed, we can ensure that disagreeing votes don't", - "interfere with each other.", - "On the first call to [`redeem()`], [`InboxItem`] will be allocated and initialized with", - "default values.", - "On subsequent calls, we want to modify the `InboxItem` by \"voting\" on it. Therefore the", - "program should not fail which would occur when using the `init` constraint.", - "The [`InboxItem::init`] field is used to guard against malicious or accidental modification", - "InboxItem fields that should remain constant." - ] - }, - { - "name": "inboxRateLimit", - "isMut": true, - "isSigner": false - }, - { - "name": "outboxRateLimit", - "isMut": true, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "RedeemArgs" - } - } - ] - }, - { - "name": "releaseInboundMint", - "accounts": [ - { - "name": "common", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "config", - "accounts": [ - { - "name": "config", - "isMut": false, - "isSigner": false - } - ] - }, - { - "name": "inboxItem", - "isMut": true, - "isSigner": false - }, - { - "name": "recipient", - "isMut": true, - "isSigner": false - }, - { - "name": "tokenAuthority", - "isMut": false, - "isSigner": false - }, - { - "name": "mint", - "isMut": true, - "isSigner": false - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "custody", - "isMut": true, - "isSigner": false - } - ] - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "ReleaseInboundArgs" - } - } - ] - }, - { - "name": "releaseInboundUnlock", - "accounts": [ - { - "name": "common", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "config", - "accounts": [ - { - "name": "config", - "isMut": false, - "isSigner": false - } - ] - }, - { - "name": "inboxItem", - "isMut": true, - "isSigner": false - }, - { - "name": "recipient", - "isMut": true, - "isSigner": false - }, - { - "name": "tokenAuthority", - "isMut": false, - "isSigner": false - }, - { - "name": "mint", - "isMut": true, - "isSigner": false - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "custody", - "isMut": true, - "isSigner": false - } - ] - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "ReleaseInboundArgs" - } - } - ] - }, - { - "name": "transferOwnership", - "accounts": [ - { - "name": "config", - "isMut": true, - "isSigner": false - }, - { - "name": "owner", - "isMut": false, - "isSigner": true - }, - { - "name": "newOwner", - "isMut": false, - "isSigner": false - }, - { - "name": "upgradeLock", - "isMut": false, - "isSigner": false - }, - { - "name": "programData", - "isMut": true, - "isSigner": false - }, - { - "name": "bpfLoaderUpgradeableProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [] - }, - { - "name": "claimOwnership", - "accounts": [ - { - "name": "config", - "isMut": true, - "isSigner": false - }, - { - "name": "upgradeLock", - "isMut": false, - "isSigner": false - }, - { - "name": "newOwner", - "isMut": false, - "isSigner": true - }, - { - "name": "programData", - "isMut": true, - "isSigner": false - }, - { - "name": "bpfLoaderUpgradeableProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [] - }, - { - "name": "setPaused", - "accounts": [ - { - "name": "owner", - "isMut": false, - "isSigner": true - }, - { - "name": "config", - "isMut": true, - "isSigner": false - } - ], - "args": [ - { - "name": "pause", - "type": "bool" - } - ] - }, - { - "name": "setPeer", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "owner", - "isMut": false, - "isSigner": true - }, - { - "name": "config", - "isMut": false, - "isSigner": false - }, - { - "name": "peer", - "isMut": true, - "isSigner": false - }, - { - "name": "inboxRateLimit", - "isMut": true, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "SetPeerArgs" - } - } - ] - }, - { - "name": "registerTransceiver", - "accounts": [ - { - "name": "config", - "isMut": true, - "isSigner": false - }, - { - "name": "owner", - "isMut": false, - "isSigner": true - }, - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "transceiver", - "isMut": false, - "isSigner": false - }, - { - "name": "registeredTransceiver", - "isMut": true, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [] - }, - { - "name": "setOutboundLimit", - "accounts": [ - { - "name": "config", - "isMut": false, - "isSigner": false - }, - { - "name": "owner", - "isMut": false, - "isSigner": true - }, - { - "name": "rateLimit", - "isMut": true, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "SetOutboundLimitArgs" - } - } - ] - }, - { - "name": "setInboundLimit", - "accounts": [ - { - "name": "config", - "isMut": false, - "isSigner": false - }, - { - "name": "owner", - "isMut": false, - "isSigner": true - }, - { - "name": "rateLimit", - "isMut": true, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "SetInboundLimitArgs" - } - } - ] - }, - { - "name": "setWormholePeer", - "accounts": [ - { - "name": "config", - "isMut": false, - "isSigner": false - }, - { - "name": "owner", - "isMut": false, - "isSigner": true - }, - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "peer", - "isMut": true, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "SetTransceiverPeerArgs" - } - } - ] - }, - { - "name": "receiveWormholeMessage", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "config", - "accounts": [ - { - "name": "config", - "isMut": false, - "isSigner": false - } - ] - }, - { - "name": "peer", - "isMut": false, - "isSigner": false - }, - { - "name": "vaa", - "isMut": false, - "isSigner": false - }, - { - "name": "transceiverMessage", - "isMut": true, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [] - }, - { - "name": "releaseWormholeOutbound", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "config", - "accounts": [ - { - "name": "config", - "isMut": false, - "isSigner": false - } - ] - }, - { - "name": "outboxItem", - "isMut": true, - "isSigner": false - }, - { - "name": "transceiver", - "isMut": false, - "isSigner": false - }, - { - "name": "wormholeMessage", - "isMut": true, - "isSigner": false - }, - { - "name": "emitter", - "isMut": false, - "isSigner": false - }, - { - "name": "wormhole", - "accounts": [ - { - "name": "bridge", - "isMut": true, - "isSigner": false - }, - { - "name": "feeCollector", - "isMut": true, - "isSigner": false - }, - { - "name": "sequence", - "isMut": true, - "isSigner": false - }, - { - "name": "program", - "isMut": false, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "clock", - "isMut": false, - "isSigner": false - }, - { - "name": "rent", - "isMut": false, - "isSigner": false - } - ] - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "ReleaseOutboundArgs" - } - } - ] - }, - { - "name": "broadcastWormholeId", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "config", - "isMut": false, - "isSigner": false - }, - { - "name": "mint", - "isMut": false, - "isSigner": false - }, - { - "name": "wormholeMessage", - "isMut": true, - "isSigner": true - }, - { - "name": "emitter", - "isMut": false, - "isSigner": false - }, - { - "name": "wormhole", - "accounts": [ - { - "name": "bridge", - "isMut": true, - "isSigner": false - }, - { - "name": "feeCollector", - "isMut": true, - "isSigner": false - }, - { - "name": "sequence", - "isMut": true, - "isSigner": false - }, - { - "name": "program", - "isMut": false, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "clock", - "isMut": false, - "isSigner": false - }, - { - "name": "rent", - "isMut": false, - "isSigner": false - } - ] - } - ], - "args": [] - }, - { - "name": "broadcastWormholePeer", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "config", - "isMut": false, - "isSigner": false - }, - { - "name": "peer", - "isMut": false, - "isSigner": false - }, - { - "name": "wormholeMessage", - "isMut": true, - "isSigner": true - }, - { - "name": "emitter", - "isMut": false, - "isSigner": false - }, - { - "name": "wormhole", - "accounts": [ - { - "name": "bridge", - "isMut": true, - "isSigner": false - }, - { - "name": "feeCollector", - "isMut": true, - "isSigner": false - }, - { - "name": "sequence", - "isMut": true, - "isSigner": false - }, - { - "name": "program", - "isMut": false, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "clock", - "isMut": false, - "isSigner": false - }, - { - "name": "rent", - "isMut": false, - "isSigner": false - } - ] - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "BroadcastPeerArgs" - } - } - ] - } - ], - "accounts": [ - { - "name": "Config", - "type": { - "kind": "struct", - "fields": [ - { - "name": "bump", - "type": "u8" - }, - { - "name": "owner", - "docs": [ - "Owner of the program." - ], - "type": "publicKey" - }, - { - "name": "pendingOwner", - "docs": [ - "Pending next owner (before claiming ownership)." - ], - "type": { - "option": "publicKey" - } - }, - { - "name": "mint", - "docs": [ - "Mint address of the token managed by this program." - ], - "type": "publicKey" - }, - { - "name": "tokenProgram", - "docs": [ - "Address of the token program (token or token22). This could always be queried", - "from the [`mint`] account's owner, but storing it here avoids an indirection", - "on the client side." - ], - "type": "publicKey" - }, - { - "name": "mode", - "docs": [ - "The mode that this program is running in. This is used to determine", - "whether the program is burning tokens or locking tokens." - ], - "type": { - "defined": "Mode" - } - }, - { - "name": "chainId", - "docs": [ - "The chain id of the chain that this program is running on. We don't", - "hardcode this so that the program is deployable on any potential SVM", - "forks." - ], - "type": { - "defined": "ChainId" - } - }, - { - "name": "nextTransceiverId", - "docs": [ - "The next transceiver id to use when registering an transceiver." - ], - "type": "u8" - }, - { - "name": "threshold", - "docs": [ - "The number of transceivers that must attest to a transfer before it is", - "accepted." - ], - "type": "u8" - }, - { - "name": "enabledTransceivers", - "docs": [ - "Bitmap of enabled transceivers.", - "The maximum number of transceivers is equal to [`Bitmap::BITS`]." - ], - "type": { - "defined": "Bitmap" - } - }, - { - "name": "paused", - "docs": [ - "Pause the program. This is useful for upgrades and other maintenance." - ], - "type": "bool" - }, - { - "name": "custody", - "docs": [ - "The custody account that holds tokens in locking mode." - ], - "type": "publicKey" - } - ] - } - }, - { - "name": "LUT", - "type": { - "kind": "struct", - "fields": [ - { - "name": "bump", - "type": "u8" - }, - { - "name": "address", - "type": "publicKey" - } - ] - } - }, - { - "name": "NttManagerPeer", - "docs": [ - "A peer on another chain. Stored in a PDA seeded by the chain id." - ], - "type": { - "kind": "struct", - "fields": [ - { - "name": "bump", - "type": "u8" - }, - { - "name": "address", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "tokenDecimals", - "type": "u8" - } - ] - } - }, - { - "name": "InboxItem", - "type": { - "kind": "struct", - "fields": [ - { - "name": "init", - "type": "bool" - }, - { - "name": "bump", - "type": "u8" - }, - { - "name": "amount", - "type": "u64" - }, - { - "name": "recipientAddress", - "type": "publicKey" - }, - { - "name": "votes", - "type": { - "defined": "Bitmap" - } - }, - { - "name": "releaseStatus", - "type": { - "defined": "ReleaseStatus" - } - } - ] - } - }, - { - "name": "InboxRateLimit", - "docs": [ - "Inbound rate limit per chain.", - "SECURITY: must check the PDA (since there are multiple PDAs, namely one for each chain.)" - ], - "type": { - "kind": "struct", - "fields": [ - { - "name": "bump", - "type": "u8" - }, - { - "name": "rateLimit", - "type": { - "defined": "RateLimitState" - } - } - ] - } - }, - { - "name": "OutboxItem", - "type": { - "kind": "struct", - "fields": [ - { - "name": "amount", - "type": { - "defined": "TrimmedAmount" - } - }, - { - "name": "sender", - "type": "publicKey" - }, - { - "name": "recipientChain", - "type": { - "defined": "ChainId" - } - }, - { - "name": "recipientNttManager", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "recipientAddress", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "releaseTimestamp", - "type": "i64" - }, - { - "name": "released", - "type": { - "defined": "Bitmap" - } - } - ] - } - }, - { - "name": "OutboxRateLimit", - "type": { - "kind": "struct", - "fields": [ - { - "name": "rateLimit", - "type": { - "defined": "RateLimitState" - } - } - ] - } - }, - { - "name": "RegisteredTransceiver", - "type": { - "kind": "struct", - "fields": [ - { - "name": "bump", - "type": "u8" - }, - { - "name": "id", - "type": "u8" - }, - { - "name": "transceiverAddress", - "type": "publicKey" - } - ] - } - }, - { - "name": "TransceiverPeer", - "docs": [ - "A peer on another chain. Stored in a PDA seeded by the chain id." - ], - "type": { - "kind": "struct", - "fields": [ - { - "name": "bump", - "type": "u8" - }, - { - "name": "address", - "type": { - "array": [ - "u8", - 32 - ] - } - } - ] - } - }, - { - "name": "BridgeData", - "type": { - "kind": "struct", - "fields": [ - { - "name": "guardianSetIndex", - "docs": [ - "The current guardian set index, used to decide which signature sets to accept." - ], - "type": "u32" - }, - { - "name": "lastLamports", - "docs": [ - "Lamports in the collection account" - ], - "type": "u64" - }, - { - "name": "config", - "docs": [ - "Bridge configuration, which is set once upon initialization." - ], - "type": { - "defined": "BridgeConfig" - } - } - ] - } - } - ], - "types": [ - { - "name": "Bitmap", - "type": { - "kind": "struct", - "fields": [ - { - "name": "map", - "type": "u128" - } - ] - } - }, - { - "name": "SetInboundLimitArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "limit", - "type": "u64" - }, - { - "name": "chainId", - "type": { - "defined": "ChainId" - } - } - ] - } - }, - { - "name": "SetOutboundLimitArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "limit", - "type": "u64" - } - ] - } - }, - { - "name": "SetPeerArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "chainId", - "type": { - "defined": "ChainId" - } - }, - { - "name": "address", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "limit", - "type": "u64" - }, - { - "name": "tokenDecimals", - "docs": [ - "The token decimals on the peer chain." - ], - "type": "u8" - } - ] - } - }, - { - "name": "InitializeArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "chainId", - "type": "u16" - }, - { - "name": "limit", - "type": "u64" - }, - { - "name": "mode", - "type": { - "defined": "Mode" - } - } - ] - } - }, - { - "name": "RedeemArgs", - "type": { - "kind": "struct", - "fields": [] - } - }, - { - "name": "ReleaseInboundArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "revertOnDelay", - "type": "bool" - } - ] - } - }, - { - "name": "TransferArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "amount", - "type": "u64" - }, - { - "name": "recipientChain", - "type": { - "defined": "ChainId" - } - }, - { - "name": "recipientAddress", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "shouldQueue", - "type": "bool" - } - ] - } - }, - { - "name": "ReleaseStatus", - "docs": [ - "The status of an InboxItem. This determines whether the tokens are minted/unlocked to the recipient. As", - "such, this must be used as a state machine that moves forward in a linear manner. A state", - "should never \"move backward\" to a previous state (e.g. should never move from `Released` to", - "`ReleaseAfter`)." - ], - "type": { - "kind": "enum", - "variants": [ - { - "name": "NotApproved" - }, - { - "name": "ReleaseAfter", - "fields": [ - "i64" - ] - }, - { - "name": "Released" - } - ] - } - }, - { - "name": "RateLimitState", - "type": { - "kind": "struct", - "fields": [ - { - "name": "limit", - "docs": [ - "The maximum capacity of the rate limiter." - ], - "type": "u64" - }, - { - "name": "capacityAtLastTx", - "docs": [ - "The capacity of the rate limiter at `last_tx_timestamp`.", - "The actual current capacity is calculated in `capacity_at`, by", - "accounting for the time that has passed since `last_tx_timestamp` and", - "the refill rate." - ], - "type": "u64" - }, - { - "name": "lastTxTimestamp", - "docs": [ - "The timestamp of the last transaction that counted towards the current", - "capacity. Transactions that exceeded the capacity do not count, they are", - "just delayed." - ], - "type": "i64" - } - ] - } - }, - { - "name": "SetTransceiverPeerArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "chainId", - "type": { - "defined": "ChainId" - } - }, - { - "name": "address", - "type": { - "array": [ - "u8", - 32 - ] - } - } - ] - } - }, - { - "name": "BroadcastPeerArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "chainId", - "type": "u16" - } - ] - } - }, - { - "name": "ReleaseOutboundArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "revertOnDelay", - "type": "bool" - } - ] - } - }, - { - "name": "ChainId", - "type": { - "kind": "struct", - "fields": [ - { - "name": "id", - "type": "u16" - } - ] - } - }, - { - "name": "Mode", - "type": { - "kind": "enum", - "variants": [ - { - "name": "Locking" - }, - { - "name": "Burning" - } - ] - } - }, - { - "name": "TrimmedAmount", - "type": { - "kind": "struct", - "fields": [ - { - "name": "amount", - "type": "u64" - }, - { - "name": "decimals", - "type": "u8" - } - ] - } - }, - { - "name": "BridgeConfig", - "type": { - "kind": "struct", - "fields": [ - { - "name": "guardianSetExpirationTime", - "docs": [ - "Period for how long a guardian set is valid after it has been replaced by a new one. This", - "guarantees that VAAs issued by that set can still be submitted for a certain period. In", - "this period we still trust the old guardian set." - ], - "type": "u32" - }, - { - "name": "fee", - "docs": [ - "Amount of lamports that needs to be paid to the protocol to post a message" - ], - "type": "u64" - } - ] - } - } - ], - "errors": [ - { - "code": 6000, - "name": "CantReleaseYet", - "msg": "CantReleaseYet" - }, - { - "code": 6001, - "name": "InvalidPendingOwner", - "msg": "InvalidPendingOwner" - }, - { - "code": 6002, - "name": "InvalidChainId", - "msg": "InvalidChainId" - }, - { - "code": 6003, - "name": "InvalidRecipientAddress", - "msg": "InvalidRecipientAddress" - }, - { - "code": 6004, - "name": "InvalidTransceiverPeer", - "msg": "InvalidTransceiverPeer" - }, - { - "code": 6005, - "name": "InvalidNttManagerPeer", - "msg": "InvalidNttManagerPeer" - }, - { - "code": 6006, - "name": "InvalidRecipientNttManager", - "msg": "InvalidRecipientNttManager" - }, - { - "code": 6007, - "name": "TransferAlreadyRedeemed", - "msg": "TransferAlreadyRedeemed" - }, - { - "code": 6008, - "name": "TransferCannotBeRedeemed", - "msg": "TransferCannotBeRedeemed" - }, - { - "code": 6009, - "name": "TransferNotApproved", - "msg": "TransferNotApproved" - }, - { - "code": 6010, - "name": "MessageAlreadySent", - "msg": "MessageAlreadySent" - }, - { - "code": 6011, - "name": "InvalidMode", - "msg": "InvalidMode" - }, - { - "code": 6012, - "name": "InvalidMintAuthority", - "msg": "InvalidMintAuthority" - }, - { - "code": 6013, - "name": "TransferExceedsRateLimit", - "msg": "TransferExceedsRateLimit" - }, - { - "code": 6014, - "name": "Paused", - "msg": "Paused" - }, - { - "code": 6015, - "name": "DisabledTransceiver", - "msg": "DisabledTransceiver" - }, - { - "code": 6016, - "name": "InvalidDeployer", - "msg": "InvalidDeployer" - }, - { - "code": 6017, - "name": "BadAmountAfterTransfer", - "msg": "BadAmountAfterTransfer" - }, - { - "code": 6018, - "name": "BadAmountAfterBurn", - "msg": "BadAmountAfterBurn" - }, - { - "code": 6019, - "name": "ZeroThreshold", - "msg": "ZeroThreshold" - }, - { - "code": 6020, - "name": "OverflowExponent", - "msg": "OverflowExponent" - }, - { - "code": 6021, - "name": "OverflowScaledAmount", - "msg": "OverflowScaledAmount" - }, - { - "code": 6022, - "name": "BitmapIndexOutOfBounds", - "msg": "BitmapIndexOutOfBounds" - } - ] -} diff --git a/solana/idl/json/wormhole_governance.json b/solana/idl/json/wormhole_governance.json deleted file mode 100644 index 1561e7350..000000000 --- a/solana/idl/json/wormhole_governance.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "version": "2.0.0", - "name": "wormhole_governance", - "instructions": [ - { - "name": "governance", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "governance", - "isMut": true, - "isSigner": false, - "docs": [ - "governed program." - ] - }, - { - "name": "vaa", - "isMut": false, - "isSigner": false - }, - { - "name": "program", - "isMut": false, - "isSigner": false - }, - { - "name": "replay", - "isMut": true, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [] - } - ], - "accounts": [ - { - "name": "ReplayProtection", - "type": { - "kind": "struct", - "fields": [ - { - "name": "bump", - "type": "u8" - } - ] - } - } - ], - "errors": [ - { - "code": 6000, - "name": "InvalidGovernanceChain", - "msg": "InvalidGovernanceChain" - }, - { - "code": 6001, - "name": "InvalidGovernanceEmitter", - "msg": "InvalidGovernanceEmitter" - }, - { - "code": 6002, - "name": "InvalidGovernanceProgram", - "msg": "InvalidGovernanceProgram" - } - ] -} \ No newline at end of file diff --git a/solana/idl/ts/example_native_token_transfers.ts b/solana/idl/ts/example_native_token_transfers.ts deleted file mode 100644 index 4a7fceeeb..000000000 --- a/solana/idl/ts/example_native_token_transfers.ts +++ /dev/null @@ -1,4087 +0,0 @@ -export type ExampleNativeTokenTransfers = { - "version": "2.0.0", - "name": "example_native_token_transfers", - "instructions": [ - { - "name": "initialize", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "deployer", - "isMut": false, - "isSigner": true - }, - { - "name": "programData", - "isMut": false, - "isSigner": false - }, - { - "name": "config", - "isMut": true, - "isSigner": false - }, - { - "name": "mint", - "isMut": false, - "isSigner": false - }, - { - "name": "rateLimit", - "isMut": true, - "isSigner": false - }, - { - "name": "tokenAuthority", - "isMut": false, - "isSigner": false - }, - { - "name": "custody", - "isMut": true, - "isSigner": false, - "docs": [ - "The custody account that holds tokens in locking mode and temporarily", - "holds tokens in burning mode.", - "function if the token account has already been created." - ] - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "associated token account for the given mint." - ] - }, - { - "name": "associatedTokenProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "bpfLoaderUpgradeableProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "InitializeArgs" - } - } - ] - }, - { - "name": "initializeLut", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "authority", - "isMut": false, - "isSigner": false - }, - { - "name": "lutAddress", - "isMut": true, - "isSigner": false - }, - { - "name": "lut", - "isMut": true, - "isSigner": false - }, - { - "name": "lutProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "entries", - "accounts": [ - { - "name": "config", - "isMut": false, - "isSigner": false - }, - { - "name": "custody", - "isMut": false, - "isSigner": false - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "mint", - "isMut": false, - "isSigner": false - }, - { - "name": "tokenAuthority", - "isMut": false, - "isSigner": false - }, - { - "name": "outboxRateLimit", - "isMut": false, - "isSigner": false - }, - { - "name": "wormhole", - "accounts": [ - { - "name": "bridge", - "isMut": true, - "isSigner": false - }, - { - "name": "feeCollector", - "isMut": true, - "isSigner": false - }, - { - "name": "sequence", - "isMut": true, - "isSigner": false - }, - { - "name": "program", - "isMut": false, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "clock", - "isMut": false, - "isSigner": false - }, - { - "name": "rent", - "isMut": false, - "isSigner": false - } - ] - } - ] - } - ], - "args": [ - { - "name": "recentSlot", - "type": "u64" - } - ] - }, - { - "name": "version", - "accounts": [], - "args": [], - "returns": "string" - }, - { - "name": "transferBurn", - "accounts": [ - { - "name": "common", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "config", - "accounts": [ - { - "name": "config", - "isMut": false, - "isSigner": false - } - ] - }, - { - "name": "mint", - "isMut": true, - "isSigner": false - }, - { - "name": "from", - "isMut": true, - "isSigner": false, - "docs": [ - "account can spend these tokens." - ] - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "outboxItem", - "isMut": true, - "isSigner": true - }, - { - "name": "outboxRateLimit", - "isMut": true, - "isSigner": false - }, - { - "name": "custody", - "isMut": true, - "isSigner": false, - "docs": [ - "Tokens are always transferred to the custody account first regardless of", - "the mode.", - "For an explanation, see the note in [`transfer_burn`]." - ] - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ] - }, - { - "name": "inboxRateLimit", - "isMut": true, - "isSigner": false - }, - { - "name": "peer", - "isMut": false, - "isSigner": false - }, - { - "name": "sessionAuthority", - "isMut": false, - "isSigner": false, - "docs": [ - "See [`crate::SESSION_AUTHORITY_SEED`] for an explanation of the flow." - ] - }, - { - "name": "tokenAuthority", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "TransferArgs" - } - } - ] - }, - { - "name": "transferLock", - "accounts": [ - { - "name": "common", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "config", - "accounts": [ - { - "name": "config", - "isMut": false, - "isSigner": false - } - ] - }, - { - "name": "mint", - "isMut": true, - "isSigner": false - }, - { - "name": "from", - "isMut": true, - "isSigner": false, - "docs": [ - "account can spend these tokens." - ] - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "outboxItem", - "isMut": true, - "isSigner": true - }, - { - "name": "outboxRateLimit", - "isMut": true, - "isSigner": false - }, - { - "name": "custody", - "isMut": true, - "isSigner": false, - "docs": [ - "Tokens are always transferred to the custody account first regardless of", - "the mode.", - "For an explanation, see the note in [`transfer_burn`]." - ] - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ] - }, - { - "name": "inboxRateLimit", - "isMut": true, - "isSigner": false - }, - { - "name": "peer", - "isMut": false, - "isSigner": false - }, - { - "name": "sessionAuthority", - "isMut": false, - "isSigner": false, - "docs": [ - "See [`crate::SESSION_AUTHORITY_SEED`] for an explanation of the flow." - ] - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "TransferArgs" - } - } - ] - }, - { - "name": "redeem", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "config", - "isMut": false, - "isSigner": false - }, - { - "name": "peer", - "isMut": false, - "isSigner": false - }, - { - "name": "transceiverMessage", - "isMut": false, - "isSigner": false - }, - { - "name": "transceiver", - "isMut": false, - "isSigner": false - }, - { - "name": "mint", - "isMut": false, - "isSigner": false - }, - { - "name": "inboxItem", - "isMut": true, - "isSigner": false, - "docs": [ - "NOTE: This account is content-addressed (PDA seeded by the message hash).", - "This is because in a multi-transceiver configuration, the different", - "transceivers \"vote\" on messages (by delivering them). By making the inbox", - "items content-addressed, we can ensure that disagreeing votes don't", - "interfere with each other.", - "On the first call to [`redeem()`], [`InboxItem`] will be allocated and initialized with", - "default values.", - "On subsequent calls, we want to modify the `InboxItem` by \"voting\" on it. Therefore the", - "program should not fail which would occur when using the `init` constraint.", - "The [`InboxItem::init`] field is used to guard against malicious or accidental modification", - "InboxItem fields that should remain constant." - ] - }, - { - "name": "inboxRateLimit", - "isMut": true, - "isSigner": false - }, - { - "name": "outboxRateLimit", - "isMut": true, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "RedeemArgs" - } - } - ] - }, - { - "name": "releaseInboundMint", - "accounts": [ - { - "name": "common", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "config", - "accounts": [ - { - "name": "config", - "isMut": false, - "isSigner": false - } - ] - }, - { - "name": "inboxItem", - "isMut": true, - "isSigner": false - }, - { - "name": "recipient", - "isMut": true, - "isSigner": false - }, - { - "name": "tokenAuthority", - "isMut": false, - "isSigner": false - }, - { - "name": "mint", - "isMut": true, - "isSigner": false - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "custody", - "isMut": true, - "isSigner": false - } - ] - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "ReleaseInboundArgs" - } - } - ] - }, - { - "name": "releaseInboundUnlock", - "accounts": [ - { - "name": "common", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "config", - "accounts": [ - { - "name": "config", - "isMut": false, - "isSigner": false - } - ] - }, - { - "name": "inboxItem", - "isMut": true, - "isSigner": false - }, - { - "name": "recipient", - "isMut": true, - "isSigner": false - }, - { - "name": "tokenAuthority", - "isMut": false, - "isSigner": false - }, - { - "name": "mint", - "isMut": true, - "isSigner": false - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "custody", - "isMut": true, - "isSigner": false - } - ] - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "ReleaseInboundArgs" - } - } - ] - }, - { - "name": "transferOwnership", - "accounts": [ - { - "name": "config", - "isMut": true, - "isSigner": false - }, - { - "name": "owner", - "isMut": false, - "isSigner": true - }, - { - "name": "newOwner", - "isMut": false, - "isSigner": false - }, - { - "name": "upgradeLock", - "isMut": false, - "isSigner": false - }, - { - "name": "programData", - "isMut": true, - "isSigner": false - }, - { - "name": "bpfLoaderUpgradeableProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [] - }, - { - "name": "claimOwnership", - "accounts": [ - { - "name": "config", - "isMut": true, - "isSigner": false - }, - { - "name": "upgradeLock", - "isMut": false, - "isSigner": false - }, - { - "name": "newOwner", - "isMut": false, - "isSigner": true - }, - { - "name": "programData", - "isMut": true, - "isSigner": false - }, - { - "name": "bpfLoaderUpgradeableProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [] - }, - { - "name": "setPaused", - "accounts": [ - { - "name": "owner", - "isMut": false, - "isSigner": true - }, - { - "name": "config", - "isMut": true, - "isSigner": false - } - ], - "args": [ - { - "name": "pause", - "type": "bool" - } - ] - }, - { - "name": "setPeer", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "owner", - "isMut": false, - "isSigner": true - }, - { - "name": "config", - "isMut": false, - "isSigner": false - }, - { - "name": "peer", - "isMut": true, - "isSigner": false - }, - { - "name": "inboxRateLimit", - "isMut": true, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "SetPeerArgs" - } - } - ] - }, - { - "name": "registerTransceiver", - "accounts": [ - { - "name": "config", - "isMut": true, - "isSigner": false - }, - { - "name": "owner", - "isMut": false, - "isSigner": true - }, - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "transceiver", - "isMut": false, - "isSigner": false - }, - { - "name": "registeredTransceiver", - "isMut": true, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [] - }, - { - "name": "setOutboundLimit", - "accounts": [ - { - "name": "config", - "isMut": false, - "isSigner": false - }, - { - "name": "owner", - "isMut": false, - "isSigner": true - }, - { - "name": "rateLimit", - "isMut": true, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "SetOutboundLimitArgs" - } - } - ] - }, - { - "name": "setInboundLimit", - "accounts": [ - { - "name": "config", - "isMut": false, - "isSigner": false - }, - { - "name": "owner", - "isMut": false, - "isSigner": true - }, - { - "name": "rateLimit", - "isMut": true, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "SetInboundLimitArgs" - } - } - ] - }, - { - "name": "setWormholePeer", - "accounts": [ - { - "name": "config", - "isMut": false, - "isSigner": false - }, - { - "name": "owner", - "isMut": false, - "isSigner": true - }, - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "peer", - "isMut": true, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "SetTransceiverPeerArgs" - } - } - ] - }, - { - "name": "receiveWormholeMessage", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "config", - "accounts": [ - { - "name": "config", - "isMut": false, - "isSigner": false - } - ] - }, - { - "name": "peer", - "isMut": false, - "isSigner": false - }, - { - "name": "vaa", - "isMut": false, - "isSigner": false - }, - { - "name": "transceiverMessage", - "isMut": true, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [] - }, - { - "name": "releaseWormholeOutbound", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "config", - "accounts": [ - { - "name": "config", - "isMut": false, - "isSigner": false - } - ] - }, - { - "name": "outboxItem", - "isMut": true, - "isSigner": false - }, - { - "name": "transceiver", - "isMut": false, - "isSigner": false - }, - { - "name": "wormholeMessage", - "isMut": true, - "isSigner": false - }, - { - "name": "emitter", - "isMut": false, - "isSigner": false - }, - { - "name": "wormhole", - "accounts": [ - { - "name": "bridge", - "isMut": true, - "isSigner": false - }, - { - "name": "feeCollector", - "isMut": true, - "isSigner": false - }, - { - "name": "sequence", - "isMut": true, - "isSigner": false - }, - { - "name": "program", - "isMut": false, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "clock", - "isMut": false, - "isSigner": false - }, - { - "name": "rent", - "isMut": false, - "isSigner": false - } - ] - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "ReleaseOutboundArgs" - } - } - ] - }, - { - "name": "broadcastWormholeId", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "config", - "isMut": false, - "isSigner": false - }, - { - "name": "mint", - "isMut": false, - "isSigner": false - }, - { - "name": "wormholeMessage", - "isMut": true, - "isSigner": true - }, - { - "name": "emitter", - "isMut": false, - "isSigner": false - }, - { - "name": "wormhole", - "accounts": [ - { - "name": "bridge", - "isMut": true, - "isSigner": false - }, - { - "name": "feeCollector", - "isMut": true, - "isSigner": false - }, - { - "name": "sequence", - "isMut": true, - "isSigner": false - }, - { - "name": "program", - "isMut": false, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "clock", - "isMut": false, - "isSigner": false - }, - { - "name": "rent", - "isMut": false, - "isSigner": false - } - ] - } - ], - "args": [] - }, - { - "name": "broadcastWormholePeer", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "config", - "isMut": false, - "isSigner": false - }, - { - "name": "peer", - "isMut": false, - "isSigner": false - }, - { - "name": "wormholeMessage", - "isMut": true, - "isSigner": true - }, - { - "name": "emitter", - "isMut": false, - "isSigner": false - }, - { - "name": "wormhole", - "accounts": [ - { - "name": "bridge", - "isMut": true, - "isSigner": false - }, - { - "name": "feeCollector", - "isMut": true, - "isSigner": false - }, - { - "name": "sequence", - "isMut": true, - "isSigner": false - }, - { - "name": "program", - "isMut": false, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "clock", - "isMut": false, - "isSigner": false - }, - { - "name": "rent", - "isMut": false, - "isSigner": false - } - ] - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "BroadcastPeerArgs" - } - } - ] - } - ], - "accounts": [ - { - "name": "config", - "type": { - "kind": "struct", - "fields": [ - { - "name": "bump", - "type": "u8" - }, - { - "name": "owner", - "docs": [ - "Owner of the program." - ], - "type": "publicKey" - }, - { - "name": "pendingOwner", - "docs": [ - "Pending next owner (before claiming ownership)." - ], - "type": { - "option": "publicKey" - } - }, - { - "name": "mint", - "docs": [ - "Mint address of the token managed by this program." - ], - "type": "publicKey" - }, - { - "name": "tokenProgram", - "docs": [ - "Address of the token program (token or token22). This could always be queried", - "from the [`mint`] account's owner, but storing it here avoids an indirection", - "on the client side." - ], - "type": "publicKey" - }, - { - "name": "mode", - "docs": [ - "The mode that this program is running in. This is used to determine", - "whether the program is burning tokens or locking tokens." - ], - "type": { - "defined": "Mode" - } - }, - { - "name": "chainId", - "docs": [ - "The chain id of the chain that this program is running on. We don't", - "hardcode this so that the program is deployable on any potential SVM", - "forks." - ], - "type": { - "defined": "ChainId" - } - }, - { - "name": "nextTransceiverId", - "docs": [ - "The next transceiver id to use when registering an transceiver." - ], - "type": "u8" - }, - { - "name": "threshold", - "docs": [ - "The number of transceivers that must attest to a transfer before it is", - "accepted." - ], - "type": "u8" - }, - { - "name": "enabledTransceivers", - "docs": [ - "Bitmap of enabled transceivers.", - "The maximum number of transceivers is equal to [`Bitmap::BITS`]." - ], - "type": { - "defined": "Bitmap" - } - }, - { - "name": "paused", - "docs": [ - "Pause the program. This is useful for upgrades and other maintenance." - ], - "type": "bool" - }, - { - "name": "custody", - "docs": [ - "The custody account that holds tokens in locking mode." - ], - "type": "publicKey" - } - ] - } - }, - { - "name": "lut", - "type": { - "kind": "struct", - "fields": [ - { - "name": "bump", - "type": "u8" - }, - { - "name": "address", - "type": "publicKey" - } - ] - } - }, - { - "name": "validatedTransceiverMessage", - "generics": [ - "A" - ], - "type": { - "kind": "struct", - "fields": [ - { - "name": "fromChain", - "type": { - "defined": "ChainId" - } - }, - { - "name": "message", - "type": { - "definedWithTypeArgs": { - "name": "TransceiverMessageData", - "args": [ - { - "type": { - "generic": "A" - } - } - ] - } - } - } - ] - } - }, - { - "name": "nttManagerPeer", - "docs": [ - "A peer on another chain. Stored in a PDA seeded by the chain id." - ], - "type": { - "kind": "struct", - "fields": [ - { - "name": "bump", - "type": "u8" - }, - { - "name": "address", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "tokenDecimals", - "type": "u8" - } - ] - } - }, - { - "name": "inboxItem", - "type": { - "kind": "struct", - "fields": [ - { - "name": "init", - "type": "bool" - }, - { - "name": "bump", - "type": "u8" - }, - { - "name": "amount", - "type": "u64" - }, - { - "name": "recipientAddress", - "type": "publicKey" - }, - { - "name": "votes", - "type": { - "defined": "Bitmap" - } - }, - { - "name": "releaseStatus", - "type": { - "defined": "ReleaseStatus" - } - } - ] - } - }, - { - "name": "inboxRateLimit", - "docs": [ - "Inbound rate limit per chain.", - "SECURITY: must check the PDA (since there are multiple PDAs, namely one for each chain.)" - ], - "type": { - "kind": "struct", - "fields": [ - { - "name": "bump", - "type": "u8" - }, - { - "name": "rateLimit", - "type": { - "defined": "RateLimitState" - } - } - ] - } - }, - { - "name": "outboxItem", - "type": { - "kind": "struct", - "fields": [ - { - "name": "amount", - "type": { - "defined": "TrimmedAmount" - } - }, - { - "name": "sender", - "type": "publicKey" - }, - { - "name": "recipientChain", - "type": { - "defined": "ChainId" - } - }, - { - "name": "recipientNttManager", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "recipientAddress", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "releaseTimestamp", - "type": "i64" - }, - { - "name": "released", - "type": { - "defined": "Bitmap" - } - } - ] - } - }, - { - "name": "outboxRateLimit", - "type": { - "kind": "struct", - "fields": [ - { - "name": "rateLimit", - "type": { - "defined": "RateLimitState" - } - } - ] - } - }, - { - "name": "registeredTransceiver", - "type": { - "kind": "struct", - "fields": [ - { - "name": "bump", - "type": "u8" - }, - { - "name": "id", - "type": "u8" - }, - { - "name": "transceiverAddress", - "type": "publicKey" - } - ] - } - }, - { - "name": "transceiverPeer", - "docs": [ - "A peer on another chain. Stored in a PDA seeded by the chain id." - ], - "type": { - "kind": "struct", - "fields": [ - { - "name": "bump", - "type": "u8" - }, - { - "name": "address", - "type": { - "array": [ - "u8", - 32 - ] - } - } - ] - } - }, - { - "name": "bridgeData", - "type": { - "kind": "struct", - "fields": [ - { - "name": "guardianSetIndex", - "docs": [ - "The current guardian set index, used to decide which signature sets to accept." - ], - "type": "u32" - }, - { - "name": "lastLamports", - "docs": [ - "Lamports in the collection account" - ], - "type": "u64" - }, - { - "name": "config", - "docs": [ - "Bridge configuration, which is set once upon initialization." - ], - "type": { - "defined": "BridgeConfig" - } - } - ] - } - } - ], - "types": [ - { - "name": "Bitmap", - "type": { - "kind": "struct", - "fields": [ - { - "name": "map", - "type": "u128" - } - ] - } - }, - { - "name": "SetInboundLimitArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "limit", - "type": "u64" - }, - { - "name": "chainId", - "type": { - "defined": "ChainId" - } - } - ] - } - }, - { - "name": "SetOutboundLimitArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "limit", - "type": "u64" - } - ] - } - }, - { - "name": "SetPeerArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "chainId", - "type": { - "defined": "ChainId" - } - }, - { - "name": "address", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "limit", - "type": "u64" - }, - { - "name": "tokenDecimals", - "docs": [ - "The token decimals on the peer chain." - ], - "type": "u8" - } - ] - } - }, - { - "name": "InitializeArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "chainId", - "type": "u16" - }, - { - "name": "limit", - "type": "u64" - }, - { - "name": "mode", - "type": { - "defined": "Mode" - } - } - ] - } - }, - { - "name": "RedeemArgs", - "type": { - "kind": "struct", - "fields": [] - } - }, - { - "name": "ReleaseInboundArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "revertOnDelay", - "type": "bool" - } - ] - } - }, - { - "name": "TransferArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "amount", - "type": "u64" - }, - { - "name": "recipientChain", - "type": { - "defined": "ChainId" - } - }, - { - "name": "recipientAddress", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "shouldQueue", - "type": "bool" - } - ] - } - }, - { - "name": "ReleaseStatus", - "docs": [ - "The status of an InboxItem. This determines whether the tokens are minted/unlocked to the recipient. As", - "such, this must be used as a state machine that moves forward in a linear manner. A state", - "should never \"move backward\" to a previous state (e.g. should never move from `Released` to", - "`ReleaseAfter`)." - ], - "type": { - "kind": "enum", - "variants": [ - { - "name": "NotApproved" - }, - { - "name": "ReleaseAfter", - "fields": [ - "i64" - ] - }, - { - "name": "Released" - } - ] - } - }, - { - "name": "RateLimitState", - "type": { - "kind": "struct", - "fields": [ - { - "name": "limit", - "docs": [ - "The maximum capacity of the rate limiter." - ], - "type": "u64" - }, - { - "name": "capacityAtLastTx", - "docs": [ - "The capacity of the rate limiter at `last_tx_timestamp`.", - "The actual current capacity is calculated in `capacity_at`, by", - "accounting for the time that has passed since `last_tx_timestamp` and", - "the refill rate." - ], - "type": "u64" - }, - { - "name": "lastTxTimestamp", - "docs": [ - "The timestamp of the last transaction that counted towards the current", - "capacity. Transactions that exceeded the capacity do not count, they are", - "just delayed." - ], - "type": "i64" - } - ] - } - }, - { - "name": "SetTransceiverPeerArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "chainId", - "type": { - "defined": "ChainId" - } - }, - { - "name": "address", - "type": { - "array": [ - "u8", - 32 - ] - } - } - ] - } - }, - { - "name": "BroadcastPeerArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "chainId", - "type": "u16" - } - ] - } - }, - { - "name": "ReleaseOutboundArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "revertOnDelay", - "type": "bool" - } - ] - } - }, - { - "name": "ChainId", - "type": { - "kind": "struct", - "fields": [ - { - "name": "id", - "type": "u16" - } - ] - } - }, - { - "name": "Mode", - "type": { - "kind": "enum", - "variants": [ - { - "name": "Locking" - }, - { - "name": "Burning" - } - ] - } - }, - { - "name": "NttManagerMessage", - "generics": [ - "A" - ], - "type": { - "kind": "struct", - "fields": [ - { - "name": "id", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "sender", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "payload", - "type": { - "generic": "A" - } - } - ] - } - }, - { - "name": "TransceiverMessageData", - "generics": [ - "A" - ], - "type": { - "kind": "struct", - "fields": [ - { - "name": "sourceNttManager", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "recipientNttManager", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "nttManagerPayload", - "type": { - "definedWithTypeArgs": { - "name": "NttManagerMessage", - "args": [ - { - "type": { - "generic": "A" - } - } - ] - } - } - } - ] - } - }, - { - "name": "TrimmedAmount", - "type": { - "kind": "struct", - "fields": [ - { - "name": "amount", - "type": "u64" - }, - { - "name": "decimals", - "type": "u8" - } - ] - } - }, - { - "name": "BridgeConfig", - "type": { - "kind": "struct", - "fields": [ - { - "name": "guardianSetExpirationTime", - "docs": [ - "Period for how long a guardian set is valid after it has been replaced by a new one. This", - "guarantees that VAAs issued by that set can still be submitted for a certain period. In", - "this period we still trust the old guardian set." - ], - "type": "u32" - }, - { - "name": "fee", - "docs": [ - "Amount of lamports that needs to be paid to the protocol to post a message" - ], - "type": "u64" - } - ] - } - } - ], - "errors": [ - { - "code": 6000, - "name": "CantReleaseYet", - "msg": "CantReleaseYet" - }, - { - "code": 6001, - "name": "InvalidPendingOwner", - "msg": "InvalidPendingOwner" - }, - { - "code": 6002, - "name": "InvalidChainId", - "msg": "InvalidChainId" - }, - { - "code": 6003, - "name": "InvalidRecipientAddress", - "msg": "InvalidRecipientAddress" - }, - { - "code": 6004, - "name": "InvalidTransceiverPeer", - "msg": "InvalidTransceiverPeer" - }, - { - "code": 6005, - "name": "InvalidNttManagerPeer", - "msg": "InvalidNttManagerPeer" - }, - { - "code": 6006, - "name": "InvalidRecipientNttManager", - "msg": "InvalidRecipientNttManager" - }, - { - "code": 6007, - "name": "TransferAlreadyRedeemed", - "msg": "TransferAlreadyRedeemed" - }, - { - "code": 6008, - "name": "TransferCannotBeRedeemed", - "msg": "TransferCannotBeRedeemed" - }, - { - "code": 6009, - "name": "TransferNotApproved", - "msg": "TransferNotApproved" - }, - { - "code": 6010, - "name": "MessageAlreadySent", - "msg": "MessageAlreadySent" - }, - { - "code": 6011, - "name": "InvalidMode", - "msg": "InvalidMode" - }, - { - "code": 6012, - "name": "InvalidMintAuthority", - "msg": "InvalidMintAuthority" - }, - { - "code": 6013, - "name": "TransferExceedsRateLimit", - "msg": "TransferExceedsRateLimit" - }, - { - "code": 6014, - "name": "Paused", - "msg": "Paused" - }, - { - "code": 6015, - "name": "DisabledTransceiver", - "msg": "DisabledTransceiver" - }, - { - "code": 6016, - "name": "InvalidDeployer", - "msg": "InvalidDeployer" - }, - { - "code": 6017, - "name": "BadAmountAfterTransfer", - "msg": "BadAmountAfterTransfer" - }, - { - "code": 6018, - "name": "BadAmountAfterBurn", - "msg": "BadAmountAfterBurn" - }, - { - "code": 6019, - "name": "ZeroThreshold", - "msg": "ZeroThreshold" - }, - { - "code": 6020, - "name": "OverflowExponent", - "msg": "OverflowExponent" - }, - { - "code": 6021, - "name": "OverflowScaledAmount", - "msg": "OverflowScaledAmount" - }, - { - "code": 6022, - "name": "BitmapIndexOutOfBounds", - "msg": "BitmapIndexOutOfBounds" - } - ] -}; - -export const IDL: ExampleNativeTokenTransfers = { - "version": "2.0.0", - "name": "example_native_token_transfers", - "instructions": [ - { - "name": "initialize", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "deployer", - "isMut": false, - "isSigner": true - }, - { - "name": "programData", - "isMut": false, - "isSigner": false - }, - { - "name": "config", - "isMut": true, - "isSigner": false - }, - { - "name": "mint", - "isMut": false, - "isSigner": false - }, - { - "name": "rateLimit", - "isMut": true, - "isSigner": false - }, - { - "name": "tokenAuthority", - "isMut": false, - "isSigner": false - }, - { - "name": "custody", - "isMut": true, - "isSigner": false, - "docs": [ - "The custody account that holds tokens in locking mode and temporarily", - "holds tokens in burning mode.", - "function if the token account has already been created." - ] - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "associated token account for the given mint." - ] - }, - { - "name": "associatedTokenProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "bpfLoaderUpgradeableProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "InitializeArgs" - } - } - ] - }, - { - "name": "initializeLut", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "authority", - "isMut": false, - "isSigner": false - }, - { - "name": "lutAddress", - "isMut": true, - "isSigner": false - }, - { - "name": "lut", - "isMut": true, - "isSigner": false - }, - { - "name": "lutProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "entries", - "accounts": [ - { - "name": "config", - "isMut": false, - "isSigner": false - }, - { - "name": "custody", - "isMut": false, - "isSigner": false - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "mint", - "isMut": false, - "isSigner": false - }, - { - "name": "tokenAuthority", - "isMut": false, - "isSigner": false - }, - { - "name": "outboxRateLimit", - "isMut": false, - "isSigner": false - }, - { - "name": "wormhole", - "accounts": [ - { - "name": "bridge", - "isMut": true, - "isSigner": false - }, - { - "name": "feeCollector", - "isMut": true, - "isSigner": false - }, - { - "name": "sequence", - "isMut": true, - "isSigner": false - }, - { - "name": "program", - "isMut": false, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "clock", - "isMut": false, - "isSigner": false - }, - { - "name": "rent", - "isMut": false, - "isSigner": false - } - ] - } - ] - } - ], - "args": [ - { - "name": "recentSlot", - "type": "u64" - } - ] - }, - { - "name": "version", - "accounts": [], - "args": [], - "returns": "string" - }, - { - "name": "transferBurn", - "accounts": [ - { - "name": "common", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "config", - "accounts": [ - { - "name": "config", - "isMut": false, - "isSigner": false - } - ] - }, - { - "name": "mint", - "isMut": true, - "isSigner": false - }, - { - "name": "from", - "isMut": true, - "isSigner": false, - "docs": [ - "account can spend these tokens." - ] - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "outboxItem", - "isMut": true, - "isSigner": true - }, - { - "name": "outboxRateLimit", - "isMut": true, - "isSigner": false - }, - { - "name": "custody", - "isMut": true, - "isSigner": false, - "docs": [ - "Tokens are always transferred to the custody account first regardless of", - "the mode.", - "For an explanation, see the note in [`transfer_burn`]." - ] - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ] - }, - { - "name": "inboxRateLimit", - "isMut": true, - "isSigner": false - }, - { - "name": "peer", - "isMut": false, - "isSigner": false - }, - { - "name": "sessionAuthority", - "isMut": false, - "isSigner": false, - "docs": [ - "See [`crate::SESSION_AUTHORITY_SEED`] for an explanation of the flow." - ] - }, - { - "name": "tokenAuthority", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "TransferArgs" - } - } - ] - }, - { - "name": "transferLock", - "accounts": [ - { - "name": "common", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "config", - "accounts": [ - { - "name": "config", - "isMut": false, - "isSigner": false - } - ] - }, - { - "name": "mint", - "isMut": true, - "isSigner": false - }, - { - "name": "from", - "isMut": true, - "isSigner": false, - "docs": [ - "account can spend these tokens." - ] - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "outboxItem", - "isMut": true, - "isSigner": true - }, - { - "name": "outboxRateLimit", - "isMut": true, - "isSigner": false - }, - { - "name": "custody", - "isMut": true, - "isSigner": false, - "docs": [ - "Tokens are always transferred to the custody account first regardless of", - "the mode.", - "For an explanation, see the note in [`transfer_burn`]." - ] - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ] - }, - { - "name": "inboxRateLimit", - "isMut": true, - "isSigner": false - }, - { - "name": "peer", - "isMut": false, - "isSigner": false - }, - { - "name": "sessionAuthority", - "isMut": false, - "isSigner": false, - "docs": [ - "See [`crate::SESSION_AUTHORITY_SEED`] for an explanation of the flow." - ] - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "TransferArgs" - } - } - ] - }, - { - "name": "redeem", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "config", - "isMut": false, - "isSigner": false - }, - { - "name": "peer", - "isMut": false, - "isSigner": false - }, - { - "name": "transceiverMessage", - "isMut": false, - "isSigner": false - }, - { - "name": "transceiver", - "isMut": false, - "isSigner": false - }, - { - "name": "mint", - "isMut": false, - "isSigner": false - }, - { - "name": "inboxItem", - "isMut": true, - "isSigner": false, - "docs": [ - "NOTE: This account is content-addressed (PDA seeded by the message hash).", - "This is because in a multi-transceiver configuration, the different", - "transceivers \"vote\" on messages (by delivering them). By making the inbox", - "items content-addressed, we can ensure that disagreeing votes don't", - "interfere with each other.", - "On the first call to [`redeem()`], [`InboxItem`] will be allocated and initialized with", - "default values.", - "On subsequent calls, we want to modify the `InboxItem` by \"voting\" on it. Therefore the", - "program should not fail which would occur when using the `init` constraint.", - "The [`InboxItem::init`] field is used to guard against malicious or accidental modification", - "InboxItem fields that should remain constant." - ] - }, - { - "name": "inboxRateLimit", - "isMut": true, - "isSigner": false - }, - { - "name": "outboxRateLimit", - "isMut": true, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "RedeemArgs" - } - } - ] - }, - { - "name": "releaseInboundMint", - "accounts": [ - { - "name": "common", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "config", - "accounts": [ - { - "name": "config", - "isMut": false, - "isSigner": false - } - ] - }, - { - "name": "inboxItem", - "isMut": true, - "isSigner": false - }, - { - "name": "recipient", - "isMut": true, - "isSigner": false - }, - { - "name": "tokenAuthority", - "isMut": false, - "isSigner": false - }, - { - "name": "mint", - "isMut": true, - "isSigner": false - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "custody", - "isMut": true, - "isSigner": false - } - ] - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "ReleaseInboundArgs" - } - } - ] - }, - { - "name": "releaseInboundUnlock", - "accounts": [ - { - "name": "common", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "config", - "accounts": [ - { - "name": "config", - "isMut": false, - "isSigner": false - } - ] - }, - { - "name": "inboxItem", - "isMut": true, - "isSigner": false - }, - { - "name": "recipient", - "isMut": true, - "isSigner": false - }, - { - "name": "tokenAuthority", - "isMut": false, - "isSigner": false - }, - { - "name": "mint", - "isMut": true, - "isSigner": false - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "custody", - "isMut": true, - "isSigner": false - } - ] - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "ReleaseInboundArgs" - } - } - ] - }, - { - "name": "transferOwnership", - "accounts": [ - { - "name": "config", - "isMut": true, - "isSigner": false - }, - { - "name": "owner", - "isMut": false, - "isSigner": true - }, - { - "name": "newOwner", - "isMut": false, - "isSigner": false - }, - { - "name": "upgradeLock", - "isMut": false, - "isSigner": false - }, - { - "name": "programData", - "isMut": true, - "isSigner": false - }, - { - "name": "bpfLoaderUpgradeableProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [] - }, - { - "name": "claimOwnership", - "accounts": [ - { - "name": "config", - "isMut": true, - "isSigner": false - }, - { - "name": "upgradeLock", - "isMut": false, - "isSigner": false - }, - { - "name": "newOwner", - "isMut": false, - "isSigner": true - }, - { - "name": "programData", - "isMut": true, - "isSigner": false - }, - { - "name": "bpfLoaderUpgradeableProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [] - }, - { - "name": "setPaused", - "accounts": [ - { - "name": "owner", - "isMut": false, - "isSigner": true - }, - { - "name": "config", - "isMut": true, - "isSigner": false - } - ], - "args": [ - { - "name": "pause", - "type": "bool" - } - ] - }, - { - "name": "setPeer", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "owner", - "isMut": false, - "isSigner": true - }, - { - "name": "config", - "isMut": false, - "isSigner": false - }, - { - "name": "peer", - "isMut": true, - "isSigner": false - }, - { - "name": "inboxRateLimit", - "isMut": true, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "SetPeerArgs" - } - } - ] - }, - { - "name": "registerTransceiver", - "accounts": [ - { - "name": "config", - "isMut": true, - "isSigner": false - }, - { - "name": "owner", - "isMut": false, - "isSigner": true - }, - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "transceiver", - "isMut": false, - "isSigner": false - }, - { - "name": "registeredTransceiver", - "isMut": true, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [] - }, - { - "name": "setOutboundLimit", - "accounts": [ - { - "name": "config", - "isMut": false, - "isSigner": false - }, - { - "name": "owner", - "isMut": false, - "isSigner": true - }, - { - "name": "rateLimit", - "isMut": true, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "SetOutboundLimitArgs" - } - } - ] - }, - { - "name": "setInboundLimit", - "accounts": [ - { - "name": "config", - "isMut": false, - "isSigner": false - }, - { - "name": "owner", - "isMut": false, - "isSigner": true - }, - { - "name": "rateLimit", - "isMut": true, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "SetInboundLimitArgs" - } - } - ] - }, - { - "name": "setWormholePeer", - "accounts": [ - { - "name": "config", - "isMut": false, - "isSigner": false - }, - { - "name": "owner", - "isMut": false, - "isSigner": true - }, - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "peer", - "isMut": true, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "SetTransceiverPeerArgs" - } - } - ] - }, - { - "name": "receiveWormholeMessage", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "config", - "accounts": [ - { - "name": "config", - "isMut": false, - "isSigner": false - } - ] - }, - { - "name": "peer", - "isMut": false, - "isSigner": false - }, - { - "name": "vaa", - "isMut": false, - "isSigner": false - }, - { - "name": "transceiverMessage", - "isMut": true, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [] - }, - { - "name": "releaseWormholeOutbound", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "config", - "accounts": [ - { - "name": "config", - "isMut": false, - "isSigner": false - } - ] - }, - { - "name": "outboxItem", - "isMut": true, - "isSigner": false - }, - { - "name": "transceiver", - "isMut": false, - "isSigner": false - }, - { - "name": "wormholeMessage", - "isMut": true, - "isSigner": false - }, - { - "name": "emitter", - "isMut": false, - "isSigner": false - }, - { - "name": "wormhole", - "accounts": [ - { - "name": "bridge", - "isMut": true, - "isSigner": false - }, - { - "name": "feeCollector", - "isMut": true, - "isSigner": false - }, - { - "name": "sequence", - "isMut": true, - "isSigner": false - }, - { - "name": "program", - "isMut": false, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "clock", - "isMut": false, - "isSigner": false - }, - { - "name": "rent", - "isMut": false, - "isSigner": false - } - ] - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "ReleaseOutboundArgs" - } - } - ] - }, - { - "name": "broadcastWormholeId", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "config", - "isMut": false, - "isSigner": false - }, - { - "name": "mint", - "isMut": false, - "isSigner": false - }, - { - "name": "wormholeMessage", - "isMut": true, - "isSigner": true - }, - { - "name": "emitter", - "isMut": false, - "isSigner": false - }, - { - "name": "wormhole", - "accounts": [ - { - "name": "bridge", - "isMut": true, - "isSigner": false - }, - { - "name": "feeCollector", - "isMut": true, - "isSigner": false - }, - { - "name": "sequence", - "isMut": true, - "isSigner": false - }, - { - "name": "program", - "isMut": false, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "clock", - "isMut": false, - "isSigner": false - }, - { - "name": "rent", - "isMut": false, - "isSigner": false - } - ] - } - ], - "args": [] - }, - { - "name": "broadcastWormholePeer", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "config", - "isMut": false, - "isSigner": false - }, - { - "name": "peer", - "isMut": false, - "isSigner": false - }, - { - "name": "wormholeMessage", - "isMut": true, - "isSigner": true - }, - { - "name": "emitter", - "isMut": false, - "isSigner": false - }, - { - "name": "wormhole", - "accounts": [ - { - "name": "bridge", - "isMut": true, - "isSigner": false - }, - { - "name": "feeCollector", - "isMut": true, - "isSigner": false - }, - { - "name": "sequence", - "isMut": true, - "isSigner": false - }, - { - "name": "program", - "isMut": false, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "clock", - "isMut": false, - "isSigner": false - }, - { - "name": "rent", - "isMut": false, - "isSigner": false - } - ] - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "BroadcastPeerArgs" - } - } - ] - } - ], - "accounts": [ - { - "name": "config", - "type": { - "kind": "struct", - "fields": [ - { - "name": "bump", - "type": "u8" - }, - { - "name": "owner", - "docs": [ - "Owner of the program." - ], - "type": "publicKey" - }, - { - "name": "pendingOwner", - "docs": [ - "Pending next owner (before claiming ownership)." - ], - "type": { - "option": "publicKey" - } - }, - { - "name": "mint", - "docs": [ - "Mint address of the token managed by this program." - ], - "type": "publicKey" - }, - { - "name": "tokenProgram", - "docs": [ - "Address of the token program (token or token22). This could always be queried", - "from the [`mint`] account's owner, but storing it here avoids an indirection", - "on the client side." - ], - "type": "publicKey" - }, - { - "name": "mode", - "docs": [ - "The mode that this program is running in. This is used to determine", - "whether the program is burning tokens or locking tokens." - ], - "type": { - "defined": "Mode" - } - }, - { - "name": "chainId", - "docs": [ - "The chain id of the chain that this program is running on. We don't", - "hardcode this so that the program is deployable on any potential SVM", - "forks." - ], - "type": { - "defined": "ChainId" - } - }, - { - "name": "nextTransceiverId", - "docs": [ - "The next transceiver id to use when registering an transceiver." - ], - "type": "u8" - }, - { - "name": "threshold", - "docs": [ - "The number of transceivers that must attest to a transfer before it is", - "accepted." - ], - "type": "u8" - }, - { - "name": "enabledTransceivers", - "docs": [ - "Bitmap of enabled transceivers.", - "The maximum number of transceivers is equal to [`Bitmap::BITS`]." - ], - "type": { - "defined": "Bitmap" - } - }, - { - "name": "paused", - "docs": [ - "Pause the program. This is useful for upgrades and other maintenance." - ], - "type": "bool" - }, - { - "name": "custody", - "docs": [ - "The custody account that holds tokens in locking mode." - ], - "type": "publicKey" - } - ] - } - }, - { - "name": "lut", - "type": { - "kind": "struct", - "fields": [ - { - "name": "bump", - "type": "u8" - }, - { - "name": "address", - "type": "publicKey" - } - ] - } - }, - { - "name": "validatedTransceiverMessage", - "generics": [ - "A" - ], - "type": { - "kind": "struct", - "fields": [ - { - "name": "fromChain", - "type": { - "defined": "ChainId" - } - }, - { - "name": "message", - "type": { - "definedWithTypeArgs": { - "name": "TransceiverMessageData", - "args": [ - { - "type": { - "generic": "A" - } - } - ] - } - } - } - ] - } - }, - { - "name": "nttManagerPeer", - "docs": [ - "A peer on another chain. Stored in a PDA seeded by the chain id." - ], - "type": { - "kind": "struct", - "fields": [ - { - "name": "bump", - "type": "u8" - }, - { - "name": "address", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "tokenDecimals", - "type": "u8" - } - ] - } - }, - { - "name": "inboxItem", - "type": { - "kind": "struct", - "fields": [ - { - "name": "init", - "type": "bool" - }, - { - "name": "bump", - "type": "u8" - }, - { - "name": "amount", - "type": "u64" - }, - { - "name": "recipientAddress", - "type": "publicKey" - }, - { - "name": "votes", - "type": { - "defined": "Bitmap" - } - }, - { - "name": "releaseStatus", - "type": { - "defined": "ReleaseStatus" - } - } - ] - } - }, - { - "name": "inboxRateLimit", - "docs": [ - "Inbound rate limit per chain.", - "SECURITY: must check the PDA (since there are multiple PDAs, namely one for each chain.)" - ], - "type": { - "kind": "struct", - "fields": [ - { - "name": "bump", - "type": "u8" - }, - { - "name": "rateLimit", - "type": { - "defined": "RateLimitState" - } - } - ] - } - }, - { - "name": "outboxItem", - "type": { - "kind": "struct", - "fields": [ - { - "name": "amount", - "type": { - "defined": "TrimmedAmount" - } - }, - { - "name": "sender", - "type": "publicKey" - }, - { - "name": "recipientChain", - "type": { - "defined": "ChainId" - } - }, - { - "name": "recipientNttManager", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "recipientAddress", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "releaseTimestamp", - "type": "i64" - }, - { - "name": "released", - "type": { - "defined": "Bitmap" - } - } - ] - } - }, - { - "name": "outboxRateLimit", - "type": { - "kind": "struct", - "fields": [ - { - "name": "rateLimit", - "type": { - "defined": "RateLimitState" - } - } - ] - } - }, - { - "name": "registeredTransceiver", - "type": { - "kind": "struct", - "fields": [ - { - "name": "bump", - "type": "u8" - }, - { - "name": "id", - "type": "u8" - }, - { - "name": "transceiverAddress", - "type": "publicKey" - } - ] - } - }, - { - "name": "transceiverPeer", - "docs": [ - "A peer on another chain. Stored in a PDA seeded by the chain id." - ], - "type": { - "kind": "struct", - "fields": [ - { - "name": "bump", - "type": "u8" - }, - { - "name": "address", - "type": { - "array": [ - "u8", - 32 - ] - } - } - ] - } - }, - { - "name": "bridgeData", - "type": { - "kind": "struct", - "fields": [ - { - "name": "guardianSetIndex", - "docs": [ - "The current guardian set index, used to decide which signature sets to accept." - ], - "type": "u32" - }, - { - "name": "lastLamports", - "docs": [ - "Lamports in the collection account" - ], - "type": "u64" - }, - { - "name": "config", - "docs": [ - "Bridge configuration, which is set once upon initialization." - ], - "type": { - "defined": "BridgeConfig" - } - } - ] - } - } - ], - "types": [ - { - "name": "Bitmap", - "type": { - "kind": "struct", - "fields": [ - { - "name": "map", - "type": "u128" - } - ] - } - }, - { - "name": "SetInboundLimitArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "limit", - "type": "u64" - }, - { - "name": "chainId", - "type": { - "defined": "ChainId" - } - } - ] - } - }, - { - "name": "SetOutboundLimitArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "limit", - "type": "u64" - } - ] - } - }, - { - "name": "SetPeerArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "chainId", - "type": { - "defined": "ChainId" - } - }, - { - "name": "address", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "limit", - "type": "u64" - }, - { - "name": "tokenDecimals", - "docs": [ - "The token decimals on the peer chain." - ], - "type": "u8" - } - ] - } - }, - { - "name": "InitializeArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "chainId", - "type": "u16" - }, - { - "name": "limit", - "type": "u64" - }, - { - "name": "mode", - "type": { - "defined": "Mode" - } - } - ] - } - }, - { - "name": "RedeemArgs", - "type": { - "kind": "struct", - "fields": [] - } - }, - { - "name": "ReleaseInboundArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "revertOnDelay", - "type": "bool" - } - ] - } - }, - { - "name": "TransferArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "amount", - "type": "u64" - }, - { - "name": "recipientChain", - "type": { - "defined": "ChainId" - } - }, - { - "name": "recipientAddress", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "shouldQueue", - "type": "bool" - } - ] - } - }, - { - "name": "ReleaseStatus", - "docs": [ - "The status of an InboxItem. This determines whether the tokens are minted/unlocked to the recipient. As", - "such, this must be used as a state machine that moves forward in a linear manner. A state", - "should never \"move backward\" to a previous state (e.g. should never move from `Released` to", - "`ReleaseAfter`)." - ], - "type": { - "kind": "enum", - "variants": [ - { - "name": "NotApproved" - }, - { - "name": "ReleaseAfter", - "fields": [ - "i64" - ] - }, - { - "name": "Released" - } - ] - } - }, - { - "name": "RateLimitState", - "type": { - "kind": "struct", - "fields": [ - { - "name": "limit", - "docs": [ - "The maximum capacity of the rate limiter." - ], - "type": "u64" - }, - { - "name": "capacityAtLastTx", - "docs": [ - "The capacity of the rate limiter at `last_tx_timestamp`.", - "The actual current capacity is calculated in `capacity_at`, by", - "accounting for the time that has passed since `last_tx_timestamp` and", - "the refill rate." - ], - "type": "u64" - }, - { - "name": "lastTxTimestamp", - "docs": [ - "The timestamp of the last transaction that counted towards the current", - "capacity. Transactions that exceeded the capacity do not count, they are", - "just delayed." - ], - "type": "i64" - } - ] - } - }, - { - "name": "SetTransceiverPeerArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "chainId", - "type": { - "defined": "ChainId" - } - }, - { - "name": "address", - "type": { - "array": [ - "u8", - 32 - ] - } - } - ] - } - }, - { - "name": "BroadcastPeerArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "chainId", - "type": "u16" - } - ] - } - }, - { - "name": "ReleaseOutboundArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "revertOnDelay", - "type": "bool" - } - ] - } - }, - { - "name": "ChainId", - "type": { - "kind": "struct", - "fields": [ - { - "name": "id", - "type": "u16" - } - ] - } - }, - { - "name": "Mode", - "type": { - "kind": "enum", - "variants": [ - { - "name": "Locking" - }, - { - "name": "Burning" - } - ] - } - }, - { - "name": "NttManagerMessage", - "generics": [ - "A" - ], - "type": { - "kind": "struct", - "fields": [ - { - "name": "id", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "sender", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "payload", - "type": { - "generic": "A" - } - } - ] - } - }, - { - "name": "TransceiverMessageData", - "generics": [ - "A" - ], - "type": { - "kind": "struct", - "fields": [ - { - "name": "sourceNttManager", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "recipientNttManager", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "nttManagerPayload", - "type": { - "definedWithTypeArgs": { - "name": "NttManagerMessage", - "args": [ - { - "type": { - "generic": "A" - } - } - ] - } - } - } - ] - } - }, - { - "name": "TrimmedAmount", - "type": { - "kind": "struct", - "fields": [ - { - "name": "amount", - "type": "u64" - }, - { - "name": "decimals", - "type": "u8" - } - ] - } - }, - { - "name": "BridgeConfig", - "type": { - "kind": "struct", - "fields": [ - { - "name": "guardianSetExpirationTime", - "docs": [ - "Period for how long a guardian set is valid after it has been replaced by a new one. This", - "guarantees that VAAs issued by that set can still be submitted for a certain period. In", - "this period we still trust the old guardian set." - ], - "type": "u32" - }, - { - "name": "fee", - "docs": [ - "Amount of lamports that needs to be paid to the protocol to post a message" - ], - "type": "u64" - } - ] - } - } - ], - "errors": [ - { - "code": 6000, - "name": "CantReleaseYet", - "msg": "CantReleaseYet" - }, - { - "code": 6001, - "name": "InvalidPendingOwner", - "msg": "InvalidPendingOwner" - }, - { - "code": 6002, - "name": "InvalidChainId", - "msg": "InvalidChainId" - }, - { - "code": 6003, - "name": "InvalidRecipientAddress", - "msg": "InvalidRecipientAddress" - }, - { - "code": 6004, - "name": "InvalidTransceiverPeer", - "msg": "InvalidTransceiverPeer" - }, - { - "code": 6005, - "name": "InvalidNttManagerPeer", - "msg": "InvalidNttManagerPeer" - }, - { - "code": 6006, - "name": "InvalidRecipientNttManager", - "msg": "InvalidRecipientNttManager" - }, - { - "code": 6007, - "name": "TransferAlreadyRedeemed", - "msg": "TransferAlreadyRedeemed" - }, - { - "code": 6008, - "name": "TransferCannotBeRedeemed", - "msg": "TransferCannotBeRedeemed" - }, - { - "code": 6009, - "name": "TransferNotApproved", - "msg": "TransferNotApproved" - }, - { - "code": 6010, - "name": "MessageAlreadySent", - "msg": "MessageAlreadySent" - }, - { - "code": 6011, - "name": "InvalidMode", - "msg": "InvalidMode" - }, - { - "code": 6012, - "name": "InvalidMintAuthority", - "msg": "InvalidMintAuthority" - }, - { - "code": 6013, - "name": "TransferExceedsRateLimit", - "msg": "TransferExceedsRateLimit" - }, - { - "code": 6014, - "name": "Paused", - "msg": "Paused" - }, - { - "code": 6015, - "name": "DisabledTransceiver", - "msg": "DisabledTransceiver" - }, - { - "code": 6016, - "name": "InvalidDeployer", - "msg": "InvalidDeployer" - }, - { - "code": 6017, - "name": "BadAmountAfterTransfer", - "msg": "BadAmountAfterTransfer" - }, - { - "code": 6018, - "name": "BadAmountAfterBurn", - "msg": "BadAmountAfterBurn" - }, - { - "code": 6019, - "name": "ZeroThreshold", - "msg": "ZeroThreshold" - }, - { - "code": 6020, - "name": "OverflowExponent", - "msg": "OverflowExponent" - }, - { - "code": 6021, - "name": "OverflowScaledAmount", - "msg": "OverflowScaledAmount" - }, - { - "code": 6022, - "name": "BitmapIndexOutOfBounds", - "msg": "BitmapIndexOutOfBounds" - } - ] -}; diff --git a/solana/idl/ts/wormhole_governance.ts b/solana/idl/ts/wormhole_governance.ts deleted file mode 100644 index b988f040d..000000000 --- a/solana/idl/ts/wormhole_governance.ts +++ /dev/null @@ -1,153 +0,0 @@ -export type WormholeGovernance = { - "version": "2.0.0", - "name": "wormhole_governance", - "instructions": [ - { - "name": "governance", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "governance", - "isMut": true, - "isSigner": false, - "docs": [ - "governed program." - ] - }, - { - "name": "vaa", - "isMut": false, - "isSigner": false - }, - { - "name": "program", - "isMut": false, - "isSigner": false - }, - { - "name": "replay", - "isMut": true, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [] - } - ], - "accounts": [ - { - "name": "replayProtection", - "type": { - "kind": "struct", - "fields": [ - { - "name": "bump", - "type": "u8" - } - ] - } - } - ], - "errors": [ - { - "code": 6000, - "name": "InvalidGovernanceChain", - "msg": "InvalidGovernanceChain" - }, - { - "code": 6001, - "name": "InvalidGovernanceEmitter", - "msg": "InvalidGovernanceEmitter" - }, - { - "code": 6002, - "name": "InvalidGovernanceProgram", - "msg": "InvalidGovernanceProgram" - } - ] -}; - -export const IDL: WormholeGovernance = { - "version": "2.0.0", - "name": "wormhole_governance", - "instructions": [ - { - "name": "governance", - "accounts": [ - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "governance", - "isMut": true, - "isSigner": false, - "docs": [ - "governed program." - ] - }, - { - "name": "vaa", - "isMut": false, - "isSigner": false - }, - { - "name": "program", - "isMut": false, - "isSigner": false - }, - { - "name": "replay", - "isMut": true, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [] - } - ], - "accounts": [ - { - "name": "replayProtection", - "type": { - "kind": "struct", - "fields": [ - { - "name": "bump", - "type": "u8" - } - ] - } - } - ], - "errors": [ - { - "code": 6000, - "name": "InvalidGovernanceChain", - "msg": "InvalidGovernanceChain" - }, - { - "code": 6001, - "name": "InvalidGovernanceEmitter", - "msg": "InvalidGovernanceEmitter" - }, - { - "code": 6002, - "name": "InvalidGovernanceProgram", - "msg": "InvalidGovernanceProgram" - } - ] -}; diff --git a/sdk/solana/jest.config.ts b/solana/jest.config.ts similarity index 78% rename from sdk/solana/jest.config.ts rename to solana/jest.config.ts index fb2287224..dff632b02 100644 --- a/sdk/solana/jest.config.ts +++ b/solana/jest.config.ts @@ -4,14 +4,14 @@ const jestConfig: JestConfigWithTsJest = { verbose: true, testTimeout: 10000000, modulePathIgnorePatterns: ["mocks"], - roots: ["./__tests__"], + roots: ["./tests"], testMatch: ["**/*.test.ts"], preset: "ts-jest", moduleNameMapper: { "^(\\.{1,2}/.*)\\.js$": "$1", }, transform: { - "^.+\\.tsx?$": ["ts-jest", { tsconfig: "tsconfig.esm.json" }], + "^.+\\.tsx?$": ["ts-jest", { tsconfig: "tsconfig.anchor.json" }], }, }; diff --git a/solana/package-lock.json b/solana/package-lock.json deleted file mode 100644 index db0a29ab0..000000000 --- a/solana/package-lock.json +++ /dev/null @@ -1,8515 +0,0 @@ -{ - "name": "example-native-token-transfers-solana", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "example-native-token-transfers-solana", - "license": "Apache-2.0", - "dependencies": { - "@certusone/wormhole-sdk": "^0.10.10", - "@coral-xyz/anchor": "^0.29.0", - "@solana/spl-token": "^0.4.0", - "@solana/web3.js": "^1.90.0", - "@wormhole-foundation/sdk-base": "^0.5.2", - "@wormhole-foundation/sdk-definitions": "^0.5.2", - "dotenv": "^16.4.5", - "sha3": "^2.1.4" - }, - "devDependencies": { - "@stylistic/eslint-plugin": "^1.6.1", - "@stylistic/eslint-plugin-js": "^1.6.1", - "@stylistic/eslint-plugin-ts": "^1.6.1", - "@types/bn.js": "^5.1.0", - "@types/chai": "^4.3.0", - "@types/mocha": "^9.0.0", - "@typescript-eslint/eslint-plugin": "^6.21.0", - "chai": "^4.3.4", - "eslint": "^8.56.0", - "eslint-config-standard-with-typescript": "^43.0.1", - "eslint-plugin-import": "^2.29.1", - "eslint-plugin-n": "^16.6.2", - "eslint-plugin-promise": "^6.1.1", - "mocha": "^9.0.3", - "prettier": "^2.6.2", - "ts-mocha": "^10.0.0", - "typescript": "^5.4.2" - } - }, - "node_modules/@aashutoshrathi/word-wrap": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", - "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/@apollo/client": { - "version": "3.9.4", - "resolved": "https://registry.npmjs.org/@apollo/client/-/client-3.9.4.tgz", - "integrity": "sha512-Ip6dxjshDT2Dp6foLASTnKBW45Fytew/5JZutZwgc78hVrrGpO9UtZA9xteHXYdap0wIgCxCfeIQwbSu1ZdQpw==", - "optional": true, - "dependencies": { - "@graphql-typed-document-node/core": "^3.1.1", - "@wry/caches": "^1.0.0", - "@wry/equality": "^0.5.6", - "@wry/trie": "^0.5.0", - "graphql-tag": "^2.12.6", - "hoist-non-react-statics": "^3.3.2", - "optimism": "^0.18.0", - "prop-types": "^15.7.2", - "rehackt": "0.0.4", - "response-iterator": "^0.2.6", - "symbol-observable": "^4.0.0", - "ts-invariant": "^0.10.3", - "tslib": "^2.3.0", - "zen-observable-ts": "^1.2.5" - }, - "peerDependencies": { - "graphql": "^15.0.0 || ^16.0.0", - "graphql-ws": "^5.5.5", - "react": "^16.8.0 || ^17.0.0 || ^18.0.0", - "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0", - "subscriptions-transport-ws": "^0.9.0 || ^0.11.0" - }, - "peerDependenciesMeta": { - "graphql-ws": { - "optional": true - }, - "react": { - "optional": true - }, - "react-dom": { - "optional": true - }, - "subscriptions-transport-ws": { - "optional": true - } - } - }, - "node_modules/@babel/runtime": { - "version": "7.23.9", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.9.tgz", - "integrity": "sha512-0CX6F+BI2s9dkUqr08KFrAIZgNFj75rdBU/DjCyYLIaV/quFjkk6T+EJ2LkZHyZTbEV4L5p97mNkUsHl2wLFAw==", - "dependencies": { - "regenerator-runtime": "^0.14.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@certusone/wormhole-sdk": { - "version": "0.10.10", - "resolved": "https://registry.npmjs.org/@certusone/wormhole-sdk/-/wormhole-sdk-0.10.10.tgz", - "integrity": "sha512-2pYQ2/+cSfh/LVtOTXQDrTeZdXHgzq/hjkTevzW5+rEqITE54qUlnMhcVtSJQe+Yvgg3awrP2mIfDW3nvwPIPA==", - "dependencies": { - "@certusone/wormhole-sdk-proto-web": "0.0.7", - "@certusone/wormhole-sdk-wasm": "^0.0.1", - "@coral-xyz/borsh": "0.2.6", - "@mysten/sui.js": "0.32.2", - "@project-serum/anchor": "^0.25.0", - "@solana/spl-token": "^0.3.5", - "@solana/web3.js": "^1.66.2", - "@terra-money/terra.js": "3.1.9", - "@xpla/xpla.js": "^0.2.1", - "algosdk": "^2.4.0", - "aptos": "1.5.0", - "axios": "^0.24.0", - "bech32": "^2.0.0", - "binary-parser": "^2.2.1", - "bs58": "^4.0.1", - "elliptic": "^6.5.4", - "js-base64": "^3.6.1", - "near-api-js": "^1.0.0" - }, - "optionalDependencies": { - "@injectivelabs/networks": "1.10.12", - "@injectivelabs/sdk-ts": "1.10.72", - "@injectivelabs/utils": "1.10.12" - } - }, - "node_modules/@certusone/wormhole-sdk-proto-web": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/@certusone/wormhole-sdk-proto-web/-/wormhole-sdk-proto-web-0.0.7.tgz", - "integrity": "sha512-GCe1/bcqMS0Mt+hsWp4SE4NLL59pWmK0lhQXO0oqAKl0G9AuuTdudySMDF/sLc7z5H2w34bSuSrIEKvPuuSC+w==", - "dependencies": { - "@improbable-eng/grpc-web": "^0.15.0", - "protobufjs": "^7.0.0", - "rxjs": "^7.5.6" - } - }, - "node_modules/@certusone/wormhole-sdk-wasm": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/@certusone/wormhole-sdk-wasm/-/wormhole-sdk-wasm-0.0.1.tgz", - "integrity": "sha512-LdIwLhOyr4pPs2jqYubqC7d4UkqYBX0EG/ppspQlW3qlVE0LZRMrH6oVzzLMyHtV0Rw7O9sIKzORW/T3mrJv2w==", - "dependencies": { - "@types/long": "^4.0.2", - "@types/node": "^18.0.3" - } - }, - "node_modules/@certusone/wormhole-sdk-wasm/node_modules/@types/node": { - "version": "18.19.15", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.15.tgz", - "integrity": "sha512-AMZ2UWx+woHNfM11PyAEQmfSxi05jm9OlkxczuHeEqmvwPkYj6MWv44gbzDPefYOLysTOFyI3ziiy2ONmUZfpA==", - "dependencies": { - "undici-types": "~5.26.4" - } - }, - "node_modules/@certusone/wormhole-sdk/node_modules/@coral-xyz/borsh": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/@coral-xyz/borsh/-/borsh-0.2.6.tgz", - "integrity": "sha512-y6nmHw1bFcJib7sMHsQPpC8r47xhqDZVvhUdna7NUPzpSbOZG6f46N21+aXsQ2w/tG8Ggls488J/ZmwbgVmyjg==", - "dependencies": { - "bn.js": "^5.1.2", - "buffer-layout": "^1.2.0" - }, - "engines": { - "node": ">=10" - }, - "peerDependencies": { - "@solana/web3.js": "^1.2.0" - } - }, - "node_modules/@certusone/wormhole-sdk/node_modules/@solana/spl-token": { - "version": "0.3.11", - "resolved": "https://registry.npmjs.org/@solana/spl-token/-/spl-token-0.3.11.tgz", - "integrity": "sha512-bvohO3rIMSVL24Pb+I4EYTJ6cL82eFpInEXD/I8K8upOGjpqHsKUoAempR/RnUlI1qSFNyFlWJfu6MNUgfbCQQ==", - "dependencies": { - "@solana/buffer-layout": "^4.0.0", - "@solana/buffer-layout-utils": "^0.2.0", - "@solana/spl-token-metadata": "^0.1.2", - "buffer": "^6.0.3" - }, - "engines": { - "node": ">=16" - }, - "peerDependencies": { - "@solana/web3.js": "^1.88.0" - } - }, - "node_modules/@classic-terra/terra.proto": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@classic-terra/terra.proto/-/terra.proto-1.1.0.tgz", - "integrity": "sha512-bYhQG5LUaGF0KPRY9hYT/HEcd1QExZPQd6zLV/rQkCe/eDxfwFRLzZHpaaAdfWoAAZjsRWqJbUCqCg7gXBbJpw==", - "dependencies": { - "@improbable-eng/grpc-web": "^0.14.1", - "google-protobuf": "^3.17.3", - "long": "^4.0.0", - "protobufjs": "~6.11.2" - } - }, - "node_modules/@classic-terra/terra.proto/node_modules/@improbable-eng/grpc-web": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/@improbable-eng/grpc-web/-/grpc-web-0.14.1.tgz", - "integrity": "sha512-XaIYuunepPxoiGVLLHmlnVminUGzBTnXr8Wv7khzmLWbNw4TCwJKX09GSMJlKhu/TRk6gms0ySFxewaETSBqgw==", - "dependencies": { - "browser-headers": "^0.4.1" - }, - "peerDependencies": { - "google-protobuf": "^3.14.0" - } - }, - "node_modules/@classic-terra/terra.proto/node_modules/protobufjs": { - "version": "6.11.4", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.4.tgz", - "integrity": "sha512-5kQWPaJHi1WoCpjTGszzQ32PG2F4+wRY6BmAT4Vfw56Q2FZ4YZzK20xUYQH4YkfehY1e6QSICrJquM6xXZNcrw==", - "hasInstallScript": true, - "dependencies": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/long": "^4.0.1", - "@types/node": ">=13.7.0", - "long": "^4.0.0" - }, - "bin": { - "pbjs": "bin/pbjs", - "pbts": "bin/pbts" - } - }, - "node_modules/@confio/ics23": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/@confio/ics23/-/ics23-0.6.8.tgz", - "integrity": "sha512-wB6uo+3A50m0sW/EWcU64xpV/8wShZ6bMTa7pF8eYsTrSkQA7oLUIJcs/wb8g4y2Oyq701BaGiO6n/ak5WXO1w==", - "optional": true, - "dependencies": { - "@noble/hashes": "^1.0.0", - "protobufjs": "^6.8.8" - } - }, - "node_modules/@confio/ics23/node_modules/protobufjs": { - "version": "6.11.4", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.4.tgz", - "integrity": "sha512-5kQWPaJHi1WoCpjTGszzQ32PG2F4+wRY6BmAT4Vfw56Q2FZ4YZzK20xUYQH4YkfehY1e6QSICrJquM6xXZNcrw==", - "hasInstallScript": true, - "optional": true, - "dependencies": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/long": "^4.0.1", - "@types/node": ">=13.7.0", - "long": "^4.0.0" - }, - "bin": { - "pbjs": "bin/pbjs", - "pbts": "bin/pbts" - } - }, - "node_modules/@coral-xyz/anchor": { - "version": "0.29.0", - "resolved": "https://registry.npmjs.org/@coral-xyz/anchor/-/anchor-0.29.0.tgz", - "integrity": "sha512-eny6QNG0WOwqV0zQ7cs/b1tIuzZGmP7U7EcH+ogt4Gdbl8HDmIYVMh/9aTmYZPaFWjtUaI8qSn73uYEXWfATdA==", - "dependencies": { - "@coral-xyz/borsh": "^0.29.0", - "@noble/hashes": "^1.3.1", - "@solana/web3.js": "^1.68.0", - "bn.js": "^5.1.2", - "bs58": "^4.0.1", - "buffer-layout": "^1.2.2", - "camelcase": "^6.3.0", - "cross-fetch": "^3.1.5", - "crypto-hash": "^1.3.0", - "eventemitter3": "^4.0.7", - "pako": "^2.0.3", - "snake-case": "^3.0.4", - "superstruct": "^0.15.4", - "toml": "^3.0.0" - }, - "engines": { - "node": ">=11" - } - }, - "node_modules/@coral-xyz/borsh": { - "version": "0.29.0", - "resolved": "https://registry.npmjs.org/@coral-xyz/borsh/-/borsh-0.29.0.tgz", - "integrity": "sha512-s7VFVa3a0oqpkuRloWVPdCK7hMbAMY270geZOGfCnaqexrP5dTIpbEHL33req6IYPPJ0hYa71cdvJ1h6V55/oQ==", - "dependencies": { - "bn.js": "^5.1.2", - "buffer-layout": "^1.2.0" - }, - "engines": { - "node": ">=10" - }, - "peerDependencies": { - "@solana/web3.js": "^1.68.0" - } - }, - "node_modules/@cosmjs/amino": { - "version": "0.30.1", - "resolved": "https://registry.npmjs.org/@cosmjs/amino/-/amino-0.30.1.tgz", - "integrity": "sha512-yNHnzmvAlkETDYIpeCTdVqgvrdt1qgkOXwuRVi8s27UKI5hfqyE9fJ/fuunXE6ZZPnKkjIecDznmuUOMrMvw4w==", - "optional": true, - "dependencies": { - "@cosmjs/crypto": "^0.30.1", - "@cosmjs/encoding": "^0.30.1", - "@cosmjs/math": "^0.30.1", - "@cosmjs/utils": "^0.30.1" - } - }, - "node_modules/@cosmjs/crypto": { - "version": "0.30.1", - "resolved": "https://registry.npmjs.org/@cosmjs/crypto/-/crypto-0.30.1.tgz", - "integrity": "sha512-rAljUlake3MSXs9xAm87mu34GfBLN0h/1uPPV6jEwClWjNkAMotzjC0ab9MARy5FFAvYHL3lWb57bhkbt2GtzQ==", - "optional": true, - "dependencies": { - "@cosmjs/encoding": "^0.30.1", - "@cosmjs/math": "^0.30.1", - "@cosmjs/utils": "^0.30.1", - "@noble/hashes": "^1", - "bn.js": "^5.2.0", - "elliptic": "^6.5.4", - "libsodium-wrappers": "^0.7.6" - } - }, - "node_modules/@cosmjs/encoding": { - "version": "0.30.1", - "resolved": "https://registry.npmjs.org/@cosmjs/encoding/-/encoding-0.30.1.tgz", - "integrity": "sha512-rXmrTbgqwihORwJ3xYhIgQFfMSrwLu1s43RIK9I8EBudPx3KmnmyAKzMOVsRDo9edLFNuZ9GIvysUCwQfq3WlQ==", - "optional": true, - "dependencies": { - "base64-js": "^1.3.0", - "bech32": "^1.1.4", - "readonly-date": "^1.0.0" - } - }, - "node_modules/@cosmjs/encoding/node_modules/bech32": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", - "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==", - "optional": true - }, - "node_modules/@cosmjs/json-rpc": { - "version": "0.30.1", - "resolved": "https://registry.npmjs.org/@cosmjs/json-rpc/-/json-rpc-0.30.1.tgz", - "integrity": "sha512-pitfC/2YN9t+kXZCbNuyrZ6M8abnCC2n62m+JtU9vQUfaEtVsgy+1Fk4TRQ175+pIWSdBMFi2wT8FWVEE4RhxQ==", - "optional": true, - "dependencies": { - "@cosmjs/stream": "^0.30.1", - "xstream": "^11.14.0" - } - }, - "node_modules/@cosmjs/math": { - "version": "0.30.1", - "resolved": "https://registry.npmjs.org/@cosmjs/math/-/math-0.30.1.tgz", - "integrity": "sha512-yaoeI23pin9ZiPHIisa6qqLngfnBR/25tSaWpkTm8Cy10MX70UF5oN4+/t1heLaM6SSmRrhk3psRkV4+7mH51Q==", - "optional": true, - "dependencies": { - "bn.js": "^5.2.0" - } - }, - "node_modules/@cosmjs/proto-signing": { - "version": "0.30.1", - "resolved": "https://registry.npmjs.org/@cosmjs/proto-signing/-/proto-signing-0.30.1.tgz", - "integrity": "sha512-tXh8pPYXV4aiJVhTKHGyeZekjj+K9s2KKojMB93Gcob2DxUjfKapFYBMJSgfKPuWUPEmyr8Q9km2hplI38ILgQ==", - "optional": true, - "dependencies": { - "@cosmjs/amino": "^0.30.1", - "@cosmjs/crypto": "^0.30.1", - "@cosmjs/encoding": "^0.30.1", - "@cosmjs/math": "^0.30.1", - "@cosmjs/utils": "^0.30.1", - "cosmjs-types": "^0.7.1", - "long": "^4.0.0" - } - }, - "node_modules/@cosmjs/socket": { - "version": "0.30.1", - "resolved": "https://registry.npmjs.org/@cosmjs/socket/-/socket-0.30.1.tgz", - "integrity": "sha512-r6MpDL+9N+qOS/D5VaxnPaMJ3flwQ36G+vPvYJsXArj93BjgyFB7BwWwXCQDzZ+23cfChPUfhbINOenr8N2Kow==", - "optional": true, - "dependencies": { - "@cosmjs/stream": "^0.30.1", - "isomorphic-ws": "^4.0.1", - "ws": "^7", - "xstream": "^11.14.0" - } - }, - "node_modules/@cosmjs/stargate": { - "version": "0.30.1", - "resolved": "https://registry.npmjs.org/@cosmjs/stargate/-/stargate-0.30.1.tgz", - "integrity": "sha512-RdbYKZCGOH8gWebO7r6WvNnQMxHrNXInY/gPHPzMjbQF6UatA6fNM2G2tdgS5j5u7FTqlCI10stNXrknaNdzog==", - "optional": true, - "dependencies": { - "@confio/ics23": "^0.6.8", - "@cosmjs/amino": "^0.30.1", - "@cosmjs/encoding": "^0.30.1", - "@cosmjs/math": "^0.30.1", - "@cosmjs/proto-signing": "^0.30.1", - "@cosmjs/stream": "^0.30.1", - "@cosmjs/tendermint-rpc": "^0.30.1", - "@cosmjs/utils": "^0.30.1", - "cosmjs-types": "^0.7.1", - "long": "^4.0.0", - "protobufjs": "~6.11.3", - "xstream": "^11.14.0" - } - }, - "node_modules/@cosmjs/stargate/node_modules/protobufjs": { - "version": "6.11.4", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.4.tgz", - "integrity": "sha512-5kQWPaJHi1WoCpjTGszzQ32PG2F4+wRY6BmAT4Vfw56Q2FZ4YZzK20xUYQH4YkfehY1e6QSICrJquM6xXZNcrw==", - "hasInstallScript": true, - "optional": true, - "dependencies": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/long": "^4.0.1", - "@types/node": ">=13.7.0", - "long": "^4.0.0" - }, - "bin": { - "pbjs": "bin/pbjs", - "pbts": "bin/pbts" - } - }, - "node_modules/@cosmjs/stream": { - "version": "0.30.1", - "resolved": "https://registry.npmjs.org/@cosmjs/stream/-/stream-0.30.1.tgz", - "integrity": "sha512-Fg0pWz1zXQdoxQZpdHRMGvUH5RqS6tPv+j9Eh7Q953UjMlrwZVo0YFLC8OTf/HKVf10E4i0u6aM8D69Q6cNkgQ==", - "optional": true, - "dependencies": { - "xstream": "^11.14.0" - } - }, - "node_modules/@cosmjs/tendermint-rpc": { - "version": "0.30.1", - "resolved": "https://registry.npmjs.org/@cosmjs/tendermint-rpc/-/tendermint-rpc-0.30.1.tgz", - "integrity": "sha512-Z3nCwhXSbPZJ++v85zHObeUggrEHVfm1u18ZRwXxFE9ZMl5mXTybnwYhczuYOl7KRskgwlB+rID0WYACxj4wdQ==", - "optional": true, - "dependencies": { - "@cosmjs/crypto": "^0.30.1", - "@cosmjs/encoding": "^0.30.1", - "@cosmjs/json-rpc": "^0.30.1", - "@cosmjs/math": "^0.30.1", - "@cosmjs/socket": "^0.30.1", - "@cosmjs/stream": "^0.30.1", - "@cosmjs/utils": "^0.30.1", - "axios": "^0.21.2", - "readonly-date": "^1.0.0", - "xstream": "^11.14.0" - } - }, - "node_modules/@cosmjs/tendermint-rpc/node_modules/axios": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", - "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", - "optional": true, - "dependencies": { - "follow-redirects": "^1.14.0" - } - }, - "node_modules/@cosmjs/utils": { - "version": "0.30.1", - "resolved": "https://registry.npmjs.org/@cosmjs/utils/-/utils-0.30.1.tgz", - "integrity": "sha512-KvvX58MGMWh7xA+N+deCfunkA/ZNDvFLw4YbOmX3f/XBIkqrVY7qlotfy2aNb1kgp6h4B6Yc8YawJPDTfvWX7g==", - "optional": true - }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", - "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", - "dev": true, - "dependencies": { - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "node_modules/@eslint-community/regexpp": { - "version": "4.10.0", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", - "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", - "dev": true, - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } - }, - "node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", - "dev": true, - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint/eslintrc/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/@eslint/js": { - "version": "8.56.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz", - "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/@ethereumjs/common": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/@ethereumjs/common/-/common-2.6.5.tgz", - "integrity": "sha512-lRyVQOeCDaIVtgfbowla32pzeDv2Obr8oR8Put5RdUBNRGr1VGPGQNGP6elWIpgK3YdpzqTOh4GyUGOureVeeA==", - "optional": true, - "dependencies": { - "crc-32": "^1.2.0", - "ethereumjs-util": "^7.1.5" - } - }, - "node_modules/@ethereumjs/tx": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/@ethereumjs/tx/-/tx-3.5.2.tgz", - "integrity": "sha512-gQDNJWKrSDGu2w7w0PzVXVBNMzb7wwdDOmOqczmhNjqFxFuIbhVJDwiGEnxFNC2/b8ifcZzY7MLcluizohRzNw==", - "optional": true, - "dependencies": { - "@ethereumjs/common": "^2.6.4", - "ethereumjs-util": "^7.1.5" - } - }, - "node_modules/@ethersproject/abi": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.7.0.tgz", - "integrity": "sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "optional": true, - "dependencies": { - "@ethersproject/address": "^5.7.0", - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/constants": "^5.7.0", - "@ethersproject/hash": "^5.7.0", - "@ethersproject/keccak256": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/strings": "^5.7.0" - } - }, - "node_modules/@ethersproject/abstract-provider": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.7.0.tgz", - "integrity": "sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "optional": true, - "dependencies": { - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/networks": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/transactions": "^5.7.0", - "@ethersproject/web": "^5.7.0" - } - }, - "node_modules/@ethersproject/abstract-signer": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.7.0.tgz", - "integrity": "sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "optional": true, - "dependencies": { - "@ethersproject/abstract-provider": "^5.7.0", - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0" - } - }, - "node_modules/@ethersproject/address": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.7.0.tgz", - "integrity": "sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "optional": true, - "dependencies": { - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/keccak256": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/rlp": "^5.7.0" - } - }, - "node_modules/@ethersproject/base64": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.7.0.tgz", - "integrity": "sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "optional": true, - "dependencies": { - "@ethersproject/bytes": "^5.7.0" - } - }, - "node_modules/@ethersproject/basex": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/basex/-/basex-5.7.0.tgz", - "integrity": "sha512-ywlh43GwZLv2Voc2gQVTKBoVQ1mti3d8HK5aMxsfu/nRDnMmNqaSJ3r3n85HBByT8OpoY96SXM1FogC533T4zw==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "optional": true, - "dependencies": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/properties": "^5.7.0" - } - }, - "node_modules/@ethersproject/bignumber": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.7.0.tgz", - "integrity": "sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "optional": true, - "dependencies": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "bn.js": "^5.2.1" - } - }, - "node_modules/@ethersproject/bytes": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.7.0.tgz", - "integrity": "sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/logger": "^5.7.0" - } - }, - "node_modules/@ethersproject/constants": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.7.0.tgz", - "integrity": "sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "optional": true, - "dependencies": { - "@ethersproject/bignumber": "^5.7.0" - } - }, - "node_modules/@ethersproject/contracts": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/contracts/-/contracts-5.7.0.tgz", - "integrity": "sha512-5GJbzEU3X+d33CdfPhcyS+z8MzsTrBGk/sc+G+59+tPa9yFkl6HQ9D6L0QMgNTA9q8dT0XKxxkyp883XsQvbbg==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "optional": true, - "dependencies": { - "@ethersproject/abi": "^5.7.0", - "@ethersproject/abstract-provider": "^5.7.0", - "@ethersproject/abstract-signer": "^5.7.0", - "@ethersproject/address": "^5.7.0", - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/constants": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/transactions": "^5.7.0" - } - }, - "node_modules/@ethersproject/hash": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.7.0.tgz", - "integrity": "sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "optional": true, - "dependencies": { - "@ethersproject/abstract-signer": "^5.7.0", - "@ethersproject/address": "^5.7.0", - "@ethersproject/base64": "^5.7.0", - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/keccak256": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/strings": "^5.7.0" - } - }, - "node_modules/@ethersproject/hdnode": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/hdnode/-/hdnode-5.7.0.tgz", - "integrity": "sha512-OmyYo9EENBPPf4ERhR7oj6uAtUAhYGqOnIS+jE5pTXvdKBS99ikzq1E7Iv0ZQZ5V36Lqx1qZLeak0Ra16qpeOg==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "optional": true, - "dependencies": { - "@ethersproject/abstract-signer": "^5.7.0", - "@ethersproject/basex": "^5.7.0", - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/pbkdf2": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/sha2": "^5.7.0", - "@ethersproject/signing-key": "^5.7.0", - "@ethersproject/strings": "^5.7.0", - "@ethersproject/transactions": "^5.7.0", - "@ethersproject/wordlists": "^5.7.0" - } - }, - "node_modules/@ethersproject/json-wallets": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/json-wallets/-/json-wallets-5.7.0.tgz", - "integrity": "sha512-8oee5Xgu6+RKgJTkvEMl2wDgSPSAQ9MB/3JYjFV9jlKvcYHUXZC+cQp0njgmxdHkYWn8s6/IqIZYm0YWCjO/0g==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "optional": true, - "dependencies": { - "@ethersproject/abstract-signer": "^5.7.0", - "@ethersproject/address": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/hdnode": "^5.7.0", - "@ethersproject/keccak256": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/pbkdf2": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/random": "^5.7.0", - "@ethersproject/strings": "^5.7.0", - "@ethersproject/transactions": "^5.7.0", - "aes-js": "3.0.0", - "scrypt-js": "3.0.1" - } - }, - "node_modules/@ethersproject/keccak256": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.7.0.tgz", - "integrity": "sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/bytes": "^5.7.0", - "js-sha3": "0.8.0" - } - }, - "node_modules/@ethersproject/logger": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.7.0.tgz", - "integrity": "sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ] - }, - "node_modules/@ethersproject/networks": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.7.1.tgz", - "integrity": "sha512-n/MufjFYv3yFcUyfhnXotyDlNdFb7onmkSy8aQERi2PjNcnWQ66xXxa3XlS8nCcA8aJKJjIIMNJTC7tu80GwpQ==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "optional": true, - "dependencies": { - "@ethersproject/logger": "^5.7.0" - } - }, - "node_modules/@ethersproject/pbkdf2": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/pbkdf2/-/pbkdf2-5.7.0.tgz", - "integrity": "sha512-oR/dBRZR6GTyaofd86DehG72hY6NpAjhabkhxgr3X2FpJtJuodEl2auADWBZfhDHgVCbu3/H/Ocq2uC6dpNjjw==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "optional": true, - "dependencies": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/sha2": "^5.7.0" - } - }, - "node_modules/@ethersproject/properties": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.7.0.tgz", - "integrity": "sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/logger": "^5.7.0" - } - }, - "node_modules/@ethersproject/providers": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.7.2.tgz", - "integrity": "sha512-g34EWZ1WWAVgr4aptGlVBF8mhl3VWjv+8hoAnzStu8Ah22VHBsuGzP17eb6xDVRzw895G4W7vvx60lFFur/1Rg==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "optional": true, - "dependencies": { - "@ethersproject/abstract-provider": "^5.7.0", - "@ethersproject/abstract-signer": "^5.7.0", - "@ethersproject/address": "^5.7.0", - "@ethersproject/base64": "^5.7.0", - "@ethersproject/basex": "^5.7.0", - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/constants": "^5.7.0", - "@ethersproject/hash": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/networks": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/random": "^5.7.0", - "@ethersproject/rlp": "^5.7.0", - "@ethersproject/sha2": "^5.7.0", - "@ethersproject/strings": "^5.7.0", - "@ethersproject/transactions": "^5.7.0", - "@ethersproject/web": "^5.7.0", - "bech32": "1.1.4", - "ws": "7.4.6" - } - }, - "node_modules/@ethersproject/providers/node_modules/bech32": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", - "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==", - "optional": true - }, - "node_modules/@ethersproject/providers/node_modules/ws": { - "version": "7.4.6", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", - "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", - "optional": true, - "engines": { - "node": ">=8.3.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, - "node_modules/@ethersproject/random": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/random/-/random-5.7.0.tgz", - "integrity": "sha512-19WjScqRA8IIeWclFme75VMXSBvi4e6InrUNuaR4s5pTF2qNhcGdCUwdxUVGtDDqC00sDLCO93jPQoDUH4HVmQ==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "optional": true, - "dependencies": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0" - } - }, - "node_modules/@ethersproject/rlp": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.7.0.tgz", - "integrity": "sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "optional": true, - "dependencies": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0" - } - }, - "node_modules/@ethersproject/sha2": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/sha2/-/sha2-5.7.0.tgz", - "integrity": "sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "optional": true, - "dependencies": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "hash.js": "1.1.7" - } - }, - "node_modules/@ethersproject/signing-key": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.7.0.tgz", - "integrity": "sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "bn.js": "^5.2.1", - "elliptic": "6.5.4", - "hash.js": "1.1.7" - } - }, - "node_modules/@ethersproject/solidity": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/solidity/-/solidity-5.7.0.tgz", - "integrity": "sha512-HmabMd2Dt/raavyaGukF4XxizWKhKQ24DoLtdNbBmNKUOPqwjsKQSdV9GQtj9CBEea9DlzETlVER1gYeXXBGaA==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "optional": true, - "dependencies": { - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/keccak256": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/sha2": "^5.7.0", - "@ethersproject/strings": "^5.7.0" - } - }, - "node_modules/@ethersproject/strings": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.7.0.tgz", - "integrity": "sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "optional": true, - "dependencies": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/constants": "^5.7.0", - "@ethersproject/logger": "^5.7.0" - } - }, - "node_modules/@ethersproject/transactions": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.7.0.tgz", - "integrity": "sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "optional": true, - "dependencies": { - "@ethersproject/address": "^5.7.0", - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/constants": "^5.7.0", - "@ethersproject/keccak256": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/rlp": "^5.7.0", - "@ethersproject/signing-key": "^5.7.0" - } - }, - "node_modules/@ethersproject/units": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/units/-/units-5.7.0.tgz", - "integrity": "sha512-pD3xLMy3SJu9kG5xDGI7+xhTEmGXlEqXU4OfNapmfnxLVY4EMSSRp7j1k7eezutBPH7RBN/7QPnwR7hzNlEFeg==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "optional": true, - "dependencies": { - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/constants": "^5.7.0", - "@ethersproject/logger": "^5.7.0" - } - }, - "node_modules/@ethersproject/wallet": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/wallet/-/wallet-5.7.0.tgz", - "integrity": "sha512-MhmXlJXEJFBFVKrDLB4ZdDzxcBxQ3rLyCkhNqVu3CDYvR97E+8r01UgrI+TI99Le+aYm/in/0vp86guJuM7FCA==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "optional": true, - "dependencies": { - "@ethersproject/abstract-provider": "^5.7.0", - "@ethersproject/abstract-signer": "^5.7.0", - "@ethersproject/address": "^5.7.0", - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/hash": "^5.7.0", - "@ethersproject/hdnode": "^5.7.0", - "@ethersproject/json-wallets": "^5.7.0", - "@ethersproject/keccak256": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/random": "^5.7.0", - "@ethersproject/signing-key": "^5.7.0", - "@ethersproject/transactions": "^5.7.0", - "@ethersproject/wordlists": "^5.7.0" - } - }, - "node_modules/@ethersproject/web": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.7.1.tgz", - "integrity": "sha512-Gueu8lSvyjBWL4cYsWsjh6MtMwM0+H4HvqFPZfB6dV8ctbP9zFAO73VG1cMWae0FLPCtz0peKPpZY8/ugJJX2w==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "optional": true, - "dependencies": { - "@ethersproject/base64": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/strings": "^5.7.0" - } - }, - "node_modules/@ethersproject/wordlists": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/wordlists/-/wordlists-5.7.0.tgz", - "integrity": "sha512-S2TFNJNfHWVHNE6cNDjbVlZ6MgE17MIxMbMg2zv3wn+3XSJGosL1m9ZVv3GXCf/2ymSsQ+hRI5IzoMJTG6aoVA==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "optional": true, - "dependencies": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/hash": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/strings": "^5.7.0" - } - }, - "node_modules/@graphql-typed-document-node/core": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/@graphql-typed-document-node/core/-/core-3.2.0.tgz", - "integrity": "sha512-mB9oAsNCm9aM3/SOv4YtBMqZbYj10R7dkq8byBqxGY/ncFwhf2oQzMV+LCRlWoDSEBJ3COiR1yeDvMtsoOsuFQ==", - "optional": true, - "peerDependencies": { - "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" - } - }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.11.14", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", - "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", - "dev": true, - "dependencies": { - "@humanwhocodes/object-schema": "^2.0.2", - "debug": "^4.3.1", - "minimatch": "^3.0.5" - }, - "engines": { - "node": ">=10.10.0" - } - }, - "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true, - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz", - "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", - "dev": true - }, - "node_modules/@improbable-eng/grpc-web": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/@improbable-eng/grpc-web/-/grpc-web-0.15.0.tgz", - "integrity": "sha512-ERft9/0/8CmYalqOVnJnpdDry28q+j+nAlFFARdjyxXDJ+Mhgv9+F600QC8BR9ygOfrXRlAk6CvST2j+JCpQPg==", - "dependencies": { - "browser-headers": "^0.4.1" - }, - "peerDependencies": { - "google-protobuf": "^3.14.0" - } - }, - "node_modules/@injectivelabs/core-proto-ts": { - "version": "0.0.14", - "resolved": "https://registry.npmjs.org/@injectivelabs/core-proto-ts/-/core-proto-ts-0.0.14.tgz", - "integrity": "sha512-NZWlgBzgVrXow9IknFQHvcYKX4QkUD25taRigoNYQK8PDn4+VXd9xM5WFUDRhzm2smTCguyl/+MghpEp4oTPWw==", - "optional": true, - "dependencies": { - "@injectivelabs/grpc-web": "^0.0.1", - "google-protobuf": "^3.14.0", - "protobufjs": "^7.0.0", - "rxjs": "^7.4.0" - } - }, - "node_modules/@injectivelabs/exceptions": { - "version": "1.14.5", - "resolved": "https://registry.npmjs.org/@injectivelabs/exceptions/-/exceptions-1.14.5.tgz", - "integrity": "sha512-WQ+hxpKz4g4+ZXNTXLFKpf9D9uosleZLqC++2+wK81IQ/lcwi5GrTLYdasOhJeu3c+LKWxHQRHJfSsvt8TQWbA==", - "hasInstallScript": true, - "optional": true, - "dependencies": { - "@injectivelabs/grpc-web": "^0.0.1", - "@injectivelabs/ts-types": "^1.14.5", - "http-status-codes": "^2.2.0", - "link-module-alias": "^1.2.0", - "shx": "^0.3.2" - } - }, - "node_modules/@injectivelabs/grpc-web": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/@injectivelabs/grpc-web/-/grpc-web-0.0.1.tgz", - "integrity": "sha512-Pu5YgaZp+OvR5UWfqbrPdHer3+gDf+b5fQoY+t2VZx1IAVHX8bzbN9EreYTvTYtFeDpYRWM8P7app2u4EX5wTw==", - "optional": true, - "dependencies": { - "browser-headers": "^0.4.1" - }, - "peerDependencies": { - "google-protobuf": "^3.14.0" - } - }, - "node_modules/@injectivelabs/grpc-web-node-http-transport": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/@injectivelabs/grpc-web-node-http-transport/-/grpc-web-node-http-transport-0.0.2.tgz", - "integrity": "sha512-rpyhXLiGY/UMs6v6YmgWHJHiO9l0AgDyVNv+jcutNVt4tQrmNvnpvz2wCAGOFtq5LuX/E9ChtTVpk3gWGqXcGA==", - "optional": true, - "peerDependencies": { - "@injectivelabs/grpc-web": ">=0.0.1" - } - }, - "node_modules/@injectivelabs/grpc-web-react-native-transport": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/@injectivelabs/grpc-web-react-native-transport/-/grpc-web-react-native-transport-0.0.2.tgz", - "integrity": "sha512-mk+aukQXnYNgPsPnu3KBi+FD0ZHQpazIlaBZ2jNZG7QAVmxTWtv3R66Zoq99Wx2dnE946NsZBYAoa0K5oSjnow==", - "optional": true, - "peerDependencies": { - "@injectivelabs/grpc-web": ">=0.0.1" - } - }, - "node_modules/@injectivelabs/indexer-proto-ts": { - "version": "1.10.8-rc.4", - "resolved": "https://registry.npmjs.org/@injectivelabs/indexer-proto-ts/-/indexer-proto-ts-1.10.8-rc.4.tgz", - "integrity": "sha512-IwbepTfsHHAv3Z36As6yH/+HIplOEpUu6SFHBCVgdSIaQ8GuvTib4HETiVnV4mjYqoyVgWs+zLSAfih46rdMJQ==", - "optional": true, - "dependencies": { - "@injectivelabs/grpc-web": "^0.0.1", - "google-protobuf": "^3.14.0", - "protobufjs": "^7.0.0", - "rxjs": "^7.4.0" - } - }, - "node_modules/@injectivelabs/mito-proto-ts": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@injectivelabs/mito-proto-ts/-/mito-proto-ts-1.0.9.tgz", - "integrity": "sha512-+TZMvJ4SHwcn6SFPdqaiQFZdNhjH7hyRFozY15nOTC2utdGij9jEsjz1NsyOejfYDA0s1z5Wm1SgrMYKaVpAmQ==", - "optional": true, - "dependencies": { - "@injectivelabs/grpc-web": "^0.0.1", - "google-protobuf": "^3.14.0", - "protobufjs": "^7.0.0", - "rxjs": "^7.4.0" - } - }, - "node_modules/@injectivelabs/networks": { - "version": "1.10.12", - "resolved": "https://registry.npmjs.org/@injectivelabs/networks/-/networks-1.10.12.tgz", - "integrity": "sha512-tTHyLls1Nik5QTs/S03qqG2y/ITvNwI8CJOQbMmmsr1CL2CdjJBtzRYn9Dyx2p8XgzRFf9hmlybpe20tq9O3SA==", - "hasInstallScript": true, - "optional": true, - "dependencies": { - "@injectivelabs/exceptions": "^1.10.12", - "@injectivelabs/ts-types": "^1.10.12", - "@injectivelabs/utils": "^1.10.12", - "link-module-alias": "^1.2.0", - "shx": "^0.3.2" - } - }, - "node_modules/@injectivelabs/sdk-ts": { - "version": "1.10.72", - "resolved": "https://registry.npmjs.org/@injectivelabs/sdk-ts/-/sdk-ts-1.10.72.tgz", - "integrity": "sha512-A5mHNNBgO4fI1c/7CZ0bGfVXliy8laP+VaYZ++aWh1YyudoZw4CTCEmLetZRy7AUU3XcfbHa8sAImRi7db+v6Q==", - "hasInstallScript": true, - "optional": true, - "dependencies": { - "@apollo/client": "^3.5.8", - "@cosmjs/amino": "^0.30.1", - "@cosmjs/proto-signing": "^0.30.1", - "@cosmjs/stargate": "^0.30.1", - "@ethersproject/bytes": "^5.7.0", - "@injectivelabs/core-proto-ts": "^0.0.14", - "@injectivelabs/exceptions": "^1.10.12", - "@injectivelabs/grpc-web": "^0.0.1", - "@injectivelabs/grpc-web-node-http-transport": "^0.0.2", - "@injectivelabs/grpc-web-react-native-transport": "^0.0.2", - "@injectivelabs/indexer-proto-ts": "1.10.8-rc.4", - "@injectivelabs/mito-proto-ts": "1.0.9", - "@injectivelabs/networks": "^1.10.12", - "@injectivelabs/test-utils": "^1.10.12", - "@injectivelabs/token-metadata": "^1.10.42", - "@injectivelabs/ts-types": "^1.10.12", - "@injectivelabs/utils": "^1.10.12", - "@metamask/eth-sig-util": "^4.0.0", - "axios": "^0.27.2", - "bech32": "^2.0.0", - "bip39": "^3.0.4", - "cosmjs-types": "^0.7.1", - "eth-crypto": "^2.6.0", - "ethereumjs-util": "^7.1.4", - "ethers": "^5.7.2", - "google-protobuf": "^3.21.0", - "graphql": "^16.3.0", - "http-status-codes": "^2.2.0", - "js-sha3": "^0.8.0", - "jscrypto": "^1.0.3", - "keccak256": "^1.0.6", - "link-module-alias": "^1.2.0", - "rxjs": "^7.8.0", - "secp256k1": "^4.0.3", - "shx": "^0.3.2", - "snakecase-keys": "^5.4.1" - } - }, - "node_modules/@injectivelabs/sdk-ts/node_modules/axios": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", - "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", - "optional": true, - "dependencies": { - "follow-redirects": "^1.14.9", - "form-data": "^4.0.0" - } - }, - "node_modules/@injectivelabs/test-utils": { - "version": "1.14.3", - "resolved": "https://registry.npmjs.org/@injectivelabs/test-utils/-/test-utils-1.14.3.tgz", - "integrity": "sha512-dVe262sACa7YkRr7mfXx58yI/ieuQqm3IMGq7EMweFKI6Kh2gh8FAM2bsDgm1cGewEIhJ9tWh6OM5uNheeVamg==", - "hasInstallScript": true, - "optional": true, - "dependencies": { - "axios": "^0.21.1", - "bignumber.js": "^9.0.1", - "link-module-alias": "^1.2.0", - "shx": "^0.3.2", - "snakecase-keys": "^5.1.2", - "store2": "^2.12.0" - } - }, - "node_modules/@injectivelabs/test-utils/node_modules/axios": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", - "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", - "optional": true, - "dependencies": { - "follow-redirects": "^1.14.0" - } - }, - "node_modules/@injectivelabs/token-metadata": { - "version": "1.14.5", - "resolved": "https://registry.npmjs.org/@injectivelabs/token-metadata/-/token-metadata-1.14.5.tgz", - "integrity": "sha512-GiIiNDixfvbfEjzZG7ixtGYmJllFIcA2Xl1LnsK5yawT8Q+/SoSIJig4tE+0CC/AaGHS1GxDKySrIdMse7PZ0w==", - "hasInstallScript": true, - "optional": true, - "dependencies": { - "@injectivelabs/exceptions": "^1.14.5", - "@injectivelabs/networks": "^1.14.5", - "@injectivelabs/ts-types": "^1.14.5", - "@injectivelabs/utils": "^1.14.5", - "@types/lodash.values": "^4.3.6", - "copyfiles": "^2.4.1", - "jsonschema": "^1.4.0", - "link-module-alias": "^1.2.0", - "lodash": "^4.17.21", - "lodash.values": "^4.3.0", - "shx": "^0.3.2" - } - }, - "node_modules/@injectivelabs/token-metadata/node_modules/@injectivelabs/networks": { - "version": "1.14.5", - "resolved": "https://registry.npmjs.org/@injectivelabs/networks/-/networks-1.14.5.tgz", - "integrity": "sha512-9GINd/pPBX6Jyc26pmlLC54s7nLlXsBLZ/1fo8a0nvHkrrODRDE4IldP6KsA9OLVomMPk5TyBUgYLGgM3ST9GA==", - "hasInstallScript": true, - "optional": true, - "dependencies": { - "@injectivelabs/exceptions": "^1.14.5", - "@injectivelabs/ts-types": "^1.14.5", - "@injectivelabs/utils": "^1.14.5", - "link-module-alias": "^1.2.0", - "shx": "^0.3.2" - } - }, - "node_modules/@injectivelabs/token-metadata/node_modules/@injectivelabs/utils": { - "version": "1.14.5", - "resolved": "https://registry.npmjs.org/@injectivelabs/utils/-/utils-1.14.5.tgz", - "integrity": "sha512-L2ul/7rgop8RLJBhlXjt6Q/A6fXeRZ3hhCZFXGXmA63vz9RSqOFHILiRp6hAFsuZbiITjmVx0eubFPaQU0MymA==", - "hasInstallScript": true, - "optional": true, - "dependencies": { - "@injectivelabs/exceptions": "^1.14.5", - "@injectivelabs/ts-types": "^1.14.5", - "axios": "^0.21.1", - "bignumber.js": "^9.0.1", - "http-status-codes": "^2.2.0", - "link-module-alias": "^1.2.0", - "shx": "^0.3.2", - "snakecase-keys": "^5.1.2", - "store2": "^2.12.0" - } - }, - "node_modules/@injectivelabs/token-metadata/node_modules/axios": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", - "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", - "optional": true, - "dependencies": { - "follow-redirects": "^1.14.0" - } - }, - "node_modules/@injectivelabs/ts-types": { - "version": "1.14.5", - "resolved": "https://registry.npmjs.org/@injectivelabs/ts-types/-/ts-types-1.14.5.tgz", - "integrity": "sha512-dwmEJE90vMr1zkQhz5lX2280sBMe2GvAj98vOHoL2RLTo0OQkJZrirUHwsTkexJf7sFZIT2PlmLCfix9Ulcp5A==", - "hasInstallScript": true, - "optional": true, - "dependencies": { - "link-module-alias": "^1.2.0", - "shx": "^0.3.2" - } - }, - "node_modules/@injectivelabs/utils": { - "version": "1.10.12", - "resolved": "https://registry.npmjs.org/@injectivelabs/utils/-/utils-1.10.12.tgz", - "integrity": "sha512-c8al79nxIJgV1cBAdW2TPDGldj/8gm5k0h5TIN/AJs8/AeIjpTwwVGfLY3QvPOpRsxuQ9CjBkTXrAcSL1wwkcw==", - "hasInstallScript": true, - "optional": true, - "dependencies": { - "@injectivelabs/exceptions": "^1.10.12", - "@injectivelabs/ts-types": "^1.10.12", - "axios": "^0.21.1", - "bignumber.js": "^9.0.1", - "http-status-codes": "^2.2.0", - "link-module-alias": "^1.2.0", - "shx": "^0.3.2", - "snakecase-keys": "^5.1.2", - "store2": "^2.12.0" - } - }, - "node_modules/@injectivelabs/utils/node_modules/axios": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", - "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", - "optional": true, - "dependencies": { - "follow-redirects": "^1.14.0" - } - }, - "node_modules/@metamask/eth-sig-util": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@metamask/eth-sig-util/-/eth-sig-util-4.0.1.tgz", - "integrity": "sha512-tghyZKLHZjcdlDqCA3gNZmLeR0XvOE9U1qoQO9ohyAZT6Pya+H9vkBPcsyXytmYLNgVoin7CKCmweo/R43V+tQ==", - "optional": true, - "dependencies": { - "ethereumjs-abi": "^0.6.8", - "ethereumjs-util": "^6.2.1", - "ethjs-util": "^0.1.6", - "tweetnacl": "^1.0.3", - "tweetnacl-util": "^0.15.1" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/@metamask/eth-sig-util/node_modules/@types/bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", - "optional": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@metamask/eth-sig-util/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==", - "optional": true - }, - "node_modules/@metamask/eth-sig-util/node_modules/ethereumjs-util": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", - "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", - "optional": true, - "dependencies": { - "@types/bn.js": "^4.11.3", - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "elliptic": "^6.5.2", - "ethereum-cryptography": "^0.1.3", - "ethjs-util": "0.1.6", - "rlp": "^2.2.3" - } - }, - "node_modules/@mysten/bcs": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/@mysten/bcs/-/bcs-0.7.1.tgz", - "integrity": "sha512-wFPb8bkhwrbiStfZMV5rFM7J+umpke59/dNjDp+UYJKykNlW23LCk2ePyEUvGdb62HGJM1jyOJ8g4egE3OmdKA==", - "dependencies": { - "bs58": "^5.0.0" - } - }, - "node_modules/@mysten/bcs/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/@mysten/bcs/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/@mysten/sui.js": { - "version": "0.32.2", - "resolved": "https://registry.npmjs.org/@mysten/sui.js/-/sui.js-0.32.2.tgz", - "integrity": "sha512-/Hm4xkGolJhqj8FvQr7QSHDTlxIvL52mtbOao9f75YjrBh7y1Uh9kbJSY7xiTF1NY9sv6p5hUVlYRJuM0Hvn9A==", - "dependencies": { - "@mysten/bcs": "0.7.1", - "@noble/curves": "^1.0.0", - "@noble/hashes": "^1.3.0", - "@scure/bip32": "^1.3.0", - "@scure/bip39": "^1.2.0", - "@suchipi/femver": "^1.0.0", - "jayson": "^4.0.0", - "rpc-websockets": "^7.5.1", - "superstruct": "^1.0.3", - "tweetnacl": "^1.0.3" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/@mysten/sui.js/node_modules/superstruct": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/superstruct/-/superstruct-1.0.3.tgz", - "integrity": "sha512-8iTn3oSS8nRGn+C2pgXSKPI3jmpm6FExNazNpjvqS6ZUJQCej3PUXEKM8NjHBOs54ExM+LPW/FBRhymrdcCiSg==", - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@noble/curves": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.3.0.tgz", - "integrity": "sha512-t01iSXPuN+Eqzb4eBX0S5oubSqXbK/xXa1Ne18Hj8f9pStxztHCE2gfboSp/dZRLSqfuLpRK2nDXDK+W9puocA==", - "dependencies": { - "@noble/hashes": "1.3.3" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "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/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@project-serum/anchor": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/@project-serum/anchor/-/anchor-0.25.0.tgz", - "integrity": "sha512-E6A5Y/ijqpfMJ5psJvbw0kVTzLZFUcOFgs6eSM2M2iWE1lVRF18T6hWZVNl6zqZsoz98jgnNHtVGJMs+ds9A7A==", - "dependencies": { - "@project-serum/borsh": "^0.2.5", - "@solana/web3.js": "^1.36.0", - "base64-js": "^1.5.1", - "bn.js": "^5.1.2", - "bs58": "^4.0.1", - "buffer-layout": "^1.2.2", - "camelcase": "^5.3.1", - "cross-fetch": "^3.1.5", - "crypto-hash": "^1.3.0", - "eventemitter3": "^4.0.7", - "js-sha256": "^0.9.0", - "pako": "^2.0.3", - "snake-case": "^3.0.4", - "superstruct": "^0.15.4", - "toml": "^3.0.0" - }, - "engines": { - "node": ">=11" - } - }, - "node_modules/@project-serum/anchor/node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "engines": { - "node": ">=6" - } - }, - "node_modules/@project-serum/borsh": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/@project-serum/borsh/-/borsh-0.2.5.tgz", - "integrity": "sha512-UmeUkUoKdQ7rhx6Leve1SssMR/Ghv8qrEiyywyxSWg7ooV7StdpPBhciiy5eB3T0qU1BXvdRNC8TdrkxK7WC5Q==", - "dependencies": { - "bn.js": "^5.1.2", - "buffer-layout": "^1.2.0" - }, - "engines": { - "node": ">=10" - }, - "peerDependencies": { - "@solana/web3.js": "^1.2.0" - } - }, - "node_modules/@protobufjs/aspromise": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", - "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==" - }, - "node_modules/@protobufjs/base64": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", - "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" - }, - "node_modules/@protobufjs/codegen": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", - "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" - }, - "node_modules/@protobufjs/eventemitter": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", - "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==" - }, - "node_modules/@protobufjs/fetch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", - "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", - "dependencies": { - "@protobufjs/aspromise": "^1.1.1", - "@protobufjs/inquire": "^1.1.0" - } - }, - "node_modules/@protobufjs/float": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", - "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==" - }, - "node_modules/@protobufjs/inquire": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", - "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==" - }, - "node_modules/@protobufjs/path": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", - "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==" - }, - "node_modules/@protobufjs/pool": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", - "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==" - }, - "node_modules/@protobufjs/utf8": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", - "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" - }, - "node_modules/@scure/base": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.5.tgz", - "integrity": "sha512-Brj9FiG2W1MRQSTB212YVPRrcbjkv48FoZi/u4l/zds/ieRrqsh7aUf6CLwkAq61oKXr/ZlTzlY66gLIj3TFTQ==", - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@scure/bip32": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.3.3.tgz", - "integrity": "sha512-LJaN3HwRbfQK0X1xFSi0Q9amqOgzQnnDngIt+ZlsBC3Bm7/nE7K0kwshZHyaru79yIVRv/e1mQAjZyuZG6jOFQ==", - "dependencies": { - "@noble/curves": "~1.3.0", - "@noble/hashes": "~1.3.2", - "@scure/base": "~1.1.4" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@scure/bip39": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.2.tgz", - "integrity": "sha512-HYf9TUXG80beW+hGAt3TRM8wU6pQoYur9iNypTROm42dorCGmLnFe3eWjz3gOq6G62H2WRh0FCzAR1PI+29zIA==", - "dependencies": { - "@noble/hashes": "~1.3.2", - "@scure/base": "~1.1.4" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@solana/buffer-layout": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@solana/buffer-layout/-/buffer-layout-4.0.1.tgz", - "integrity": "sha512-E1ImOIAD1tBZFRdjeM4/pzTiTApC0AOBGwyAMS4fwIodCWArzJ3DWdoh8cKxeFM2fElkxBh2Aqts1BPC373rHA==", - "dependencies": { - "buffer": "~6.0.3" - }, - "engines": { - "node": ">=5.10" - } - }, - "node_modules/@solana/buffer-layout-utils": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/@solana/buffer-layout-utils/-/buffer-layout-utils-0.2.0.tgz", - "integrity": "sha512-szG4sxgJGktbuZYDg2FfNmkMi0DYQoVjN2h7ta1W1hPrwzarcFLBq9UpX1UjNXsNpT9dn+chgprtWGioUAr4/g==", - "dependencies": { - "@solana/buffer-layout": "^4.0.0", - "@solana/web3.js": "^1.32.0", - "bigint-buffer": "^1.1.5", - "bignumber.js": "^9.0.1" - }, - "engines": { - "node": ">= 10" - } - }, - "node_modules/@solana/codecs-core": { - "version": "2.0.0-experimental.8618508", - "resolved": "https://registry.npmjs.org/@solana/codecs-core/-/codecs-core-2.0.0-experimental.8618508.tgz", - "integrity": "sha512-JCz7mKjVKtfZxkuDtwMAUgA7YvJcA2BwpZaA1NOLcted4OMC4Prwa3DUe3f3181ixPYaRyptbF0Ikq2MbDkYEA==" - }, - "node_modules/@solana/codecs-data-structures": { - "version": "2.0.0-experimental.8618508", - "resolved": "https://registry.npmjs.org/@solana/codecs-data-structures/-/codecs-data-structures-2.0.0-experimental.8618508.tgz", - "integrity": "sha512-sLpjL9sqzaDdkloBPV61Rht1tgaKq98BCtIKRuyscIrmVPu3wu0Bavk2n/QekmUzaTsj7K1pVSniM0YqCdnEBw==", - "dependencies": { - "@solana/codecs-core": "2.0.0-experimental.8618508", - "@solana/codecs-numbers": "2.0.0-experimental.8618508" - } - }, - "node_modules/@solana/codecs-numbers": { - "version": "2.0.0-experimental.8618508", - "resolved": "https://registry.npmjs.org/@solana/codecs-numbers/-/codecs-numbers-2.0.0-experimental.8618508.tgz", - "integrity": "sha512-EXQKfzFr3CkKKNzKSZPOOOzchXsFe90TVONWsSnVkonO9z+nGKALE0/L9uBmIFGgdzhhU9QQVFvxBMclIDJo2Q==", - "dependencies": { - "@solana/codecs-core": "2.0.0-experimental.8618508" - } - }, - "node_modules/@solana/codecs-strings": { - "version": "2.0.0-experimental.8618508", - "resolved": "https://registry.npmjs.org/@solana/codecs-strings/-/codecs-strings-2.0.0-experimental.8618508.tgz", - "integrity": "sha512-b2yhinr1+oe+JDmnnsV0641KQqqDG8AQ16Z/x7GVWO+AWHMpRlHWVXOq8U1yhPMA4VXxl7i+D+C6ql0VGFp0GA==", - "dependencies": { - "@solana/codecs-core": "2.0.0-experimental.8618508", - "@solana/codecs-numbers": "2.0.0-experimental.8618508" - }, - "peerDependencies": { - "fastestsmallesttextencoderdecoder": "^1.0.22" - } - }, - "node_modules/@solana/options": { - "version": "2.0.0-experimental.8618508", - "resolved": "https://registry.npmjs.org/@solana/options/-/options-2.0.0-experimental.8618508.tgz", - "integrity": "sha512-fy/nIRAMC3QHvnKi63KEd86Xr/zFBVxNW4nEpVEU2OT0gCEKwHY4Z55YHf7XujhyuM3PNpiBKg/YYw5QlRU4vg==", - "dependencies": { - "@solana/codecs-core": "2.0.0-experimental.8618508", - "@solana/codecs-numbers": "2.0.0-experimental.8618508" - } - }, - "node_modules/@solana/spl-token": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@solana/spl-token/-/spl-token-0.4.0.tgz", - "integrity": "sha512-jjBIBG9IsclqQVl5Y82npGE6utdCh7Z9VFcF5qgJa5EUq2XgspW3Dt1wujWjH/vQDRnkp9zGO+BqQU/HhX/3wg==", - "dependencies": { - "@solana/buffer-layout": "^4.0.0", - "@solana/buffer-layout-utils": "^0.2.0", - "@solana/spl-token-metadata": "^0.1.2", - "buffer": "^6.0.3" - }, - "engines": { - "node": ">=16" - }, - "peerDependencies": { - "@solana/web3.js": "^1.89.1" - } - }, - "node_modules/@solana/spl-token-metadata": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@solana/spl-token-metadata/-/spl-token-metadata-0.1.2.tgz", - "integrity": "sha512-hJYnAJNkDrtkE2Q41YZhCpeOGU/0JgRFXbtrtOuGGeKc3pkEUHB9DDoxZAxx+XRno13GozUleyBi0qypz4c3bw==", - "dependencies": { - "@solana/codecs-core": "2.0.0-experimental.8618508", - "@solana/codecs-data-structures": "2.0.0-experimental.8618508", - "@solana/codecs-numbers": "2.0.0-experimental.8618508", - "@solana/codecs-strings": "2.0.0-experimental.8618508", - "@solana/options": "2.0.0-experimental.8618508", - "@solana/spl-type-length-value": "0.1.0" - }, - "engines": { - "node": ">=16" - }, - "peerDependencies": { - "@solana/web3.js": "^1.87.6" - } - }, - "node_modules/@solana/spl-type-length-value": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@solana/spl-type-length-value/-/spl-type-length-value-0.1.0.tgz", - "integrity": "sha512-JBMGB0oR4lPttOZ5XiUGyvylwLQjt1CPJa6qQ5oM+MBCndfjz2TKKkw0eATlLLcYmq1jBVsNlJ2cD6ns2GR7lA==", - "dependencies": { - "buffer": "^6.0.3" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/@solana/web3.js": { - "version": "1.90.0", - "resolved": "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.90.0.tgz", - "integrity": "sha512-p0cb/COXb8NNVSMkGMPwqQ6NvObZgUitN80uOedMB+jbYWOKOeJBuPnzhenkIV9RX0krGwyuY1Ltn5O8MGFsEw==", - "dependencies": { - "@babel/runtime": "^7.23.4", - "@noble/curves": "^1.2.0", - "@noble/hashes": "^1.3.2", - "@solana/buffer-layout": "^4.0.1", - "agentkeepalive": "^4.5.0", - "bigint-buffer": "^1.1.5", - "bn.js": "^5.2.1", - "borsh": "^0.7.0", - "bs58": "^4.0.1", - "buffer": "6.0.3", - "fast-stable-stringify": "^1.0.0", - "jayson": "^4.1.0", - "node-fetch": "^2.7.0", - "rpc-websockets": "^7.5.1", - "superstruct": "^0.14.2" - } - }, - "node_modules/@solana/web3.js/node_modules/superstruct": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/superstruct/-/superstruct-0.14.2.tgz", - "integrity": "sha512-nPewA6m9mR3d6k7WkZ8N8zpTWfenFH3q9pA2PkuiZxINr9DKB2+40wEQf0ixn8VaGuJ78AB6iWOtStI+/4FKZQ==" - }, - "node_modules/@stylistic/eslint-plugin": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin/-/eslint-plugin-1.6.1.tgz", - "integrity": "sha512-De7Sw86OtIf7SsMgjLCf4bTeI3085Plyh4l0Rg1V42BTFo/Q6Pz7Cbu31rEk/UHFiEna/YO8Hxj80jFP3ObrQw==", - "dev": true, - "dependencies": { - "@stylistic/eslint-plugin-js": "1.6.1", - "@stylistic/eslint-plugin-jsx": "1.6.1", - "@stylistic/eslint-plugin-plus": "1.6.1", - "@stylistic/eslint-plugin-ts": "1.6.1" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "peerDependencies": { - "eslint": ">=8.40.0" - } - }, - "node_modules/@stylistic/eslint-plugin-js": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-js/-/eslint-plugin-js-1.6.1.tgz", - "integrity": "sha512-gHRxkbA5p8S1fnChE7Yf5NFltRZCzbCuQOcoTe93PSKBC4GqVjZmlWUSLz9pJKHvDAUTjWkfttWHIOaFYPEhRQ==", - "dev": true, - "dependencies": { - "acorn": "^8.11.3", - "escape-string-regexp": "^4.0.0", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "peerDependencies": { - "eslint": ">=8.40.0" - } - }, - "node_modules/@stylistic/eslint-plugin-js/node_modules/acorn": { - "version": "8.11.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", - "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/@stylistic/eslint-plugin-jsx": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-jsx/-/eslint-plugin-jsx-1.6.1.tgz", - "integrity": "sha512-uJQcg3iqrhm3EH15ZjxmZ1YmXXexkLKFEgxkWA3RYjgAVTx8k7xGJwClK/JnjKDGdbFRiDQPjxt964R1vsaFaQ==", - "dev": true, - "dependencies": { - "@stylistic/eslint-plugin-js": "^1.6.1", - "estraverse": "^5.3.0", - "picomatch": "^3.0.1" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "peerDependencies": { - "eslint": ">=8.40.0" - } - }, - "node_modules/@stylistic/eslint-plugin-jsx/node_modules/picomatch": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-3.0.1.tgz", - "integrity": "sha512-I3EurrIQMlRc9IaAZnqRR044Phh2DXY+55o7uJ0V+hYZAcQYSuFWsc9q5PvyDHUSCe1Qxn/iBz+78s86zWnGag==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/@stylistic/eslint-plugin-plus": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-plus/-/eslint-plugin-plus-1.6.1.tgz", - "integrity": "sha512-nYIXfdYN+pBVmm0vPCKQFg/IK35tf3ZGz+0WENUL6ww1+jKM6/i36FalRFculiHzO+wOpJ3/yXWJC3PCbwGFZQ==", - "dev": true, - "dependencies": { - "@typescript-eslint/utils": "^6.20.0" - }, - "peerDependencies": { - "eslint": "*" - } - }, - "node_modules/@stylistic/eslint-plugin-ts": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-ts/-/eslint-plugin-ts-1.6.1.tgz", - "integrity": "sha512-eZxrFaLhPJVUQmtsRXKiuzSou0nlHevKc1WsfhxUJ9p8juv3G3YlbbGeYg4AP1fNlEmWs/lZQAP2WfzQOdBNvQ==", - "dev": true, - "dependencies": { - "@stylistic/eslint-plugin-js": "1.6.1", - "@typescript-eslint/utils": "^6.20.0" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "peerDependencies": { - "eslint": ">=8.40.0" - } - }, - "node_modules/@suchipi/femver": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@suchipi/femver/-/femver-1.0.0.tgz", - "integrity": "sha512-bprE8+K5V+DPX7q2e2K57ImqNBdfGHDIWaGI5xHxZoxbKOuQZn4wzPiUxOAHnsUr3w3xHrWXwN7gnG/iIuEMIg==" - }, - "node_modules/@terra-money/legacy.proto": { - "name": "@terra-money/terra.proto", - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/@terra-money/terra.proto/-/terra.proto-0.1.7.tgz", - "integrity": "sha512-NXD7f6pQCulvo6+mv6MAPzhOkUzRjgYVuHZE/apih+lVnPG5hDBU0rRYnOGGofwvKT5/jQoOENnFn/gioWWnyQ==", - "dependencies": { - "google-protobuf": "^3.17.3", - "long": "^4.0.0", - "protobufjs": "~6.11.2" - } - }, - "node_modules/@terra-money/legacy.proto/node_modules/protobufjs": { - "version": "6.11.4", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.4.tgz", - "integrity": "sha512-5kQWPaJHi1WoCpjTGszzQ32PG2F4+wRY6BmAT4Vfw56Q2FZ4YZzK20xUYQH4YkfehY1e6QSICrJquM6xXZNcrw==", - "hasInstallScript": true, - "dependencies": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/long": "^4.0.1", - "@types/node": ">=13.7.0", - "long": "^4.0.0" - }, - "bin": { - "pbjs": "bin/pbjs", - "pbts": "bin/pbts" - } - }, - "node_modules/@terra-money/terra.js": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/@terra-money/terra.js/-/terra.js-3.1.9.tgz", - "integrity": "sha512-JulSvOHLM56fL7s+cIjIbZeWPBluq883X1soWxA4TG5rKkDythT/DHeLXr3jP5Ld/26VENPSg6lNvK7cEYKpiw==", - "dependencies": { - "@classic-terra/terra.proto": "^1.1.0", - "@terra-money/terra.proto": "^2.1.0", - "axios": "^0.27.2", - "bech32": "^2.0.0", - "bip32": "^2.0.6", - "bip39": "^3.0.3", - "bufferutil": "^4.0.3", - "decimal.js": "^10.2.1", - "jscrypto": "^1.0.1", - "readable-stream": "^3.6.0", - "secp256k1": "^4.0.2", - "tmp": "^0.2.1", - "utf-8-validate": "^5.0.5", - "ws": "^7.5.9" - }, - "engines": { - "node": ">=14" - } - }, - "node_modules/@terra-money/terra.js/node_modules/axios": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", - "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", - "dependencies": { - "follow-redirects": "^1.14.9", - "form-data": "^4.0.0" - } - }, - "node_modules/@terra-money/terra.proto": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@terra-money/terra.proto/-/terra.proto-2.1.0.tgz", - "integrity": "sha512-rhaMslv3Rkr+QsTQEZs64FKA4QlfO0DfQHaR6yct/EovenMkibDEQ63dEL6yJA6LCaEQGYhyVB9JO9pTUA8ybw==", - "dependencies": { - "@improbable-eng/grpc-web": "^0.14.1", - "google-protobuf": "^3.17.3", - "long": "^4.0.0", - "protobufjs": "~6.11.2" - } - }, - "node_modules/@terra-money/terra.proto/node_modules/@improbable-eng/grpc-web": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/@improbable-eng/grpc-web/-/grpc-web-0.14.1.tgz", - "integrity": "sha512-XaIYuunepPxoiGVLLHmlnVminUGzBTnXr8Wv7khzmLWbNw4TCwJKX09GSMJlKhu/TRk6gms0ySFxewaETSBqgw==", - "dependencies": { - "browser-headers": "^0.4.1" - }, - "peerDependencies": { - "google-protobuf": "^3.14.0" - } - }, - "node_modules/@terra-money/terra.proto/node_modules/protobufjs": { - "version": "6.11.4", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.4.tgz", - "integrity": "sha512-5kQWPaJHi1WoCpjTGszzQ32PG2F4+wRY6BmAT4Vfw56Q2FZ4YZzK20xUYQH4YkfehY1e6QSICrJquM6xXZNcrw==", - "hasInstallScript": true, - "dependencies": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/long": "^4.0.1", - "@types/node": ">=13.7.0", - "long": "^4.0.0" - }, - "bin": { - "pbjs": "bin/pbjs", - "pbts": "bin/pbts" - } - }, - "node_modules/@types/bn.js": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.5.tgz", - "integrity": "sha512-V46N0zwKRF5Q00AZ6hWtN0T8gGmDUaUzLWQvHFo5yThtVwK/VCenFY3wXVbOvNfajEpsTfQM4IN9k/d6gUVX3A==", - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/chai": { - "version": "4.3.11", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.11.tgz", - "integrity": "sha512-qQR1dr2rGIHYlJulmr8Ioq3De0Le9E4MJ5AiaeAETJJpndT1uUNHsGFK3L/UIu+rbkQSdj8J/w2bCsBZc/Y5fQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/connect": { - "version": "3.4.38", - "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", - "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true - }, - "node_modules/@types/json5": { - "version": "0.0.29", - "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", - "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/lodash": { - "version": "4.14.202", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.202.tgz", - "integrity": "sha512-OvlIYQK9tNneDlS0VN54LLd5uiPCBOp7gS5Z0f1mjoJYBrtStzgmJBxONW3U6OZqdtNzZPmn9BS/7WI7BFFcFQ==", - "optional": true - }, - "node_modules/@types/lodash.values": { - "version": "4.3.9", - "resolved": "https://registry.npmjs.org/@types/lodash.values/-/lodash.values-4.3.9.tgz", - "integrity": "sha512-IJ20OEfqNwm3k8ENwoM3q0yOs4UMpgtD4GqxB4lwBHToGthHWqhyh5DdSgQjioocz0QK2SSBkJfCq95ZTV8BTw==", - "optional": true, - "dependencies": { - "@types/lodash": "*" - } - }, - "node_modules/@types/long": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", - "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==" - }, - "node_modules/@types/mocha": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-9.1.1.tgz", - "integrity": "sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/node": { - "version": "20.11.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.5.tgz", - "integrity": "sha512-g557vgQjUUfN76MZAN/dt1z3dzcUsimuysco0KeluHgrPdJXkP/XdAURgyO2W9fZWHRtRBiVKzKn8vyOAwlG+w==", - "license": "MIT", - "dependencies": { - "undici-types": "~5.26.4" - } - }, - "node_modules/@types/pbkdf2": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@types/pbkdf2/-/pbkdf2-3.1.2.tgz", - "integrity": "sha512-uRwJqmiXmh9++aSu1VNEn3iIxWOhd8AHXNSdlaLfdAAdSTY9jYVeGWnzejM3dvrkbqE3/hyQkQQ29IFATEGlew==", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/secp256k1": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/@types/secp256k1/-/secp256k1-4.0.6.tgz", - "integrity": "sha512-hHxJU6PAEUn0TP4S/ZOzuTUvJWuZ6eIKeNKb5RBpODvSl6hp1Wrw4s7ATY50rklRCScUDpHzVA/DQdSjJ3UoYQ==", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/semver": { - "version": "7.5.6", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.6.tgz", - "integrity": "sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==", - "dev": true - }, - "node_modules/@types/ws": { - "version": "7.4.7", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz", - "integrity": "sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@typescript-eslint/eslint-plugin": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz", - "integrity": "sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA==", - "dev": true, - "dependencies": { - "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.21.0", - "@typescript-eslint/type-utils": "6.21.0", - "@typescript-eslint/utils": "6.21.0", - "@typescript-eslint/visitor-keys": "6.21.0", - "debug": "^4.3.4", - "graphemer": "^1.4.0", - "ignore": "^5.2.4", - "natural-compare": "^1.4.0", - "semver": "^7.5.4", - "ts-api-utils": "^1.0.1" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", - "eslint": "^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "node_modules/@typescript-eslint/parser": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.21.0.tgz", - "integrity": "sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==", - "dev": true, - "dependencies": { - "@typescript-eslint/scope-manager": "6.21.0", - "@typescript-eslint/types": "6.21.0", - "@typescript-eslint/typescript-estree": "6.21.0", - "@typescript-eslint/visitor-keys": "6.21.0", - "debug": "^4.3.4" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/parser/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/parser/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz", - "integrity": "sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "6.21.0", - "@typescript-eslint/visitor-keys": "6.21.0" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/type-utils": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.21.0.tgz", - "integrity": "sha512-rZQI7wHfao8qMX3Rd3xqeYSMCL3SoiSQLBATSiVKARdFGCYSRvmViieZjqc58jKgs8Y8i9YvVVhRbHSTA4VBag==", - "dev": true, - "dependencies": { - "@typescript-eslint/typescript-estree": "6.21.0", - "@typescript-eslint/utils": "6.21.0", - "debug": "^4.3.4", - "ts-api-utils": "^1.0.1" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/type-utils/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/type-utils/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "node_modules/@typescript-eslint/types": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.21.0.tgz", - "integrity": "sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==", - "dev": true, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz", - "integrity": "sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "6.21.0", - "@typescript-eslint/visitor-keys": "6.21.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "minimatch": "9.0.3", - "semver": "^7.5.4", - "ts-api-utils": "^1.0.1" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", - "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "node_modules/@typescript-eslint/utils": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.21.0.tgz", - "integrity": "sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==", - "dev": true, - "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "@types/json-schema": "^7.0.12", - "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.21.0", - "@typescript-eslint/types": "6.21.0", - "@typescript-eslint/typescript-estree": "6.21.0", - "semver": "^7.5.4" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" - } - }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz", - "integrity": "sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "6.21.0", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@ungap/promise-all-settled": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", - "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", - "dev": true, - "license": "ISC" - }, - "node_modules/@ungap/structured-clone": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", - "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", - "dev": true - }, - "node_modules/@wormhole-foundation/sdk-base": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-base/-/sdk-base-0.5.2.tgz", - "integrity": "sha512-CJ4DFfHcdXH+d87JFbyj9ipD+ZhtlKTtXqdS2K5+IH1EQSEp9tBeAtkV1xRSSB87BJ9vOn7/UL3B/Tgv1ohIbw==", - "dependencies": { - "@scure/base": "^1.1.3" - } - }, - "node_modules/@wormhole-foundation/sdk-definitions": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-definitions/-/sdk-definitions-0.5.2.tgz", - "integrity": "sha512-njbd0mGGjd2i9C8GT79ktDhEtSCE7aTsje+uPjIAjIU8Z5P089Zy9qFZb+l6oSHXHjmVce40EgYkyN4FtRjtwg==", - "dependencies": { - "@noble/curves": "^1.4.0", - "@noble/hashes": "^1.3.1", - "@wormhole-foundation/sdk-base": "0.5.2" - } - }, - "node_modules/@wormhole-foundation/sdk-definitions/node_modules/@noble/curves": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.0.tgz", - "integrity": "sha512-p+4cb332SFCrReJkCYe8Xzm0OWi4Jji5jVdIZRL/PmacmDkFNw6MrrV+gGpiPxLHbV+zKFRywUWbaseT+tZRXg==", - "dependencies": { - "@noble/hashes": "1.4.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@wormhole-foundation/sdk-definitions/node_modules/@noble/hashes": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", - "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@wry/caches": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@wry/caches/-/caches-1.0.1.tgz", - "integrity": "sha512-bXuaUNLVVkD20wcGBWRyo7j9N3TxePEWFZj2Y+r9OoUzfqmavM84+mFykRicNsBqatba5JLay1t48wxaXaWnlA==", - "optional": true, - "dependencies": { - "tslib": "^2.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@wry/context": { - "version": "0.7.4", - "resolved": "https://registry.npmjs.org/@wry/context/-/context-0.7.4.tgz", - "integrity": "sha512-jmT7Sb4ZQWI5iyu3lobQxICu2nC/vbUhP0vIdd6tHC9PTfenmRmuIFqktc6GH9cgi+ZHnsLWPvfSvc4DrYmKiQ==", - "optional": true, - "dependencies": { - "tslib": "^2.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@wry/equality": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/@wry/equality/-/equality-0.5.7.tgz", - "integrity": "sha512-BRFORjsTuQv5gxcXsuDXx6oGRhuVsEGwZy6LOzRRfgu+eSfxbhUQ9L9YtSEIuIjY/o7g3iWFjrc5eSY1GXP2Dw==", - "optional": true, - "dependencies": { - "tslib": "^2.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@wry/trie": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@wry/trie/-/trie-0.5.0.tgz", - "integrity": "sha512-FNoYzHawTMk/6KMQoEG5O4PuioX19UbwdQKF44yw0nLfOypfQdjtfZzo/UIJWAJ23sNIFbD1Ug9lbaDGMwbqQA==", - "optional": true, - "dependencies": { - "tslib": "^2.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@xpla/xpla.js": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@xpla/xpla.js/-/xpla.js-0.2.3.tgz", - "integrity": "sha512-Tfk7hCGWXtwr08reY3Pi6dmzIqFbzri9jcyzJdfNmdo4cN0PMwpRJuZZcPmtxiIUnNef3AN1E/6nJUD5MKniuA==", - "dependencies": { - "@ethersproject/bytes": "^5.6.1", - "@ethersproject/keccak256": "^5.6.1", - "@ethersproject/signing-key": "^5.6.2", - "@terra-money/legacy.proto": "npm:@terra-money/terra.proto@^0.1.7", - "@terra-money/terra.proto": "^2.1.0", - "axios": "^0.26.1", - "bech32": "^2.0.0", - "bip32": "^2.0.6", - "bip39": "^3.0.3", - "bufferutil": "^4.0.3", - "crypto-addr-codec": "^0.1.7", - "decimal.js": "^10.2.1", - "elliptic": "^6.5.4", - "ethereumjs-util": "^7.1.5", - "jscrypto": "^1.0.1", - "readable-stream": "^3.6.0", - "secp256k1": "^4.0.2", - "tmp": "^0.2.1", - "utf-8-validate": "^5.0.5", - "ws": "^7.5.8" - }, - "engines": { - "node": ">=14" - } - }, - "node_modules/@xpla/xpla.js/node_modules/axios": { - "version": "0.26.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz", - "integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==", - "dependencies": { - "follow-redirects": "^1.14.8" - } - }, - "node_modules/acorn": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", - "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==", - "devOptional": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/aes-js": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", - "integrity": "sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==", - "optional": true - }, - "node_modules/agentkeepalive": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.5.0.tgz", - "integrity": "sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==", - "dependencies": { - "humanize-ms": "^1.2.1" - }, - "engines": { - "node": ">= 8.0.0" - } - }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/algo-msgpack-with-bigint": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/algo-msgpack-with-bigint/-/algo-msgpack-with-bigint-2.1.1.tgz", - "integrity": "sha512-F1tGh056XczEaEAqu7s+hlZUDWwOBT70Eq0lfMpBP2YguSQVyxRbprLq5rELXKQOyOaixTWYhMeMQMzP0U5FoQ==", - "engines": { - "node": ">= 10" - } - }, - "node_modules/algosdk": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/algosdk/-/algosdk-2.7.0.tgz", - "integrity": "sha512-sBE9lpV7bup3rZ+q2j3JQaFAE9JwZvjWKX00vPlG8e9txctXbgLL56jZhSWZndqhDI9oI+0P4NldkuQIWdrUyg==", - "dependencies": { - "algo-msgpack-with-bigint": "^2.1.1", - "buffer": "^6.0.3", - "hi-base32": "^0.5.1", - "js-sha256": "^0.9.0", - "js-sha3": "^0.8.0", - "js-sha512": "^0.8.0", - "json-bigint": "^1.0.0", - "tweetnacl": "^1.0.3", - "vlq": "^2.0.4" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "devOptional": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "devOptional": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "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==", - "dev": true, - "license": "ISC", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/aptos": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/aptos/-/aptos-1.5.0.tgz", - "integrity": "sha512-N7OuRtU7IYHkDkNx+4QS3g/QQGCp+36KzYn3oXPmT7Kttfuv+UKliQVdjy3cLmwd/DCQSh9ObTovwdxnHjUn0g==", - "dependencies": { - "@noble/hashes": "1.1.3", - "@scure/bip39": "1.1.0", - "axios": "0.27.2", - "form-data": "4.0.0", - "tweetnacl": "1.0.3" - }, - "engines": { - "node": ">=11.0.0" - } - }, - "node_modules/aptos/node_modules/@noble/hashes": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.1.3.tgz", - "integrity": "sha512-CE0FCR57H2acVI5UOzIGSSIYxZ6v/HOhDR0Ro9VLyhnzLwx0o8W1mmgaqlEUx4049qJDlIBRztv5k+MM8vbO3A==", - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ] - }, - "node_modules/aptos/node_modules/@scure/bip39": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.1.0.tgz", - "integrity": "sha512-pwrPOS16VeTKg98dYXQyIjJEcWfz7/1YJIwxUEPFfQPtc86Ym/1sVgQ2RLoD43AazMk2l/unK4ITySSpW2+82w==", - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "dependencies": { - "@noble/hashes": "~1.1.1", - "@scure/base": "~1.1.0" - } - }, - "node_modules/aptos/node_modules/axios": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", - "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", - "dependencies": { - "follow-redirects": "^1.14.9", - "form-data": "^4.0.0" - } - }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true, - "license": "Python-2.0" - }, - "node_modules/array-buffer-byte-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", - "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.5", - "is-array-buffer": "^3.0.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array-includes": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.7.tgz", - "integrity": "sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "get-intrinsic": "^1.2.1", - "is-string": "^1.0.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/array.prototype.filter": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array.prototype.filter/-/array.prototype.filter-1.0.3.tgz", - "integrity": "sha512-VizNcj/RGJiUyQBgzwxzE5oHdeuXY5hSbbmKMlphj1cy1Vl7Pn2asCGbSrru6hSQjmCzqTBPVWAF/whmEOVHbw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-array-method-boxes-properly": "^1.0.0", - "is-string": "^1.0.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.findlastindex": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.4.tgz", - "integrity": "sha512-hzvSHUshSpCflDR1QMUBLHGHP1VIEBegT4pix9H/Z92Xw3ySoy6c2qh7lJWTJnRJ8JCZ9bJNCgTyYaJGcJu6xQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.5", - "define-properties": "^1.2.1", - "es-abstract": "^1.22.3", - "es-errors": "^1.3.0", - "es-shim-unscopables": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.flat": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz", - "integrity": "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.flatmap": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz", - "integrity": "sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/arraybuffer.prototype.slice": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", - "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", - "dev": true, - "dependencies": { - "array-buffer-byte-length": "^1.0.1", - "call-bind": "^1.0.5", - "define-properties": "^1.2.1", - "es-abstract": "^1.22.3", - "es-errors": "^1.2.1", - "get-intrinsic": "^1.2.3", - "is-array-buffer": "^3.0.4", - "is-shared-array-buffer": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/assertion-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", - "dev": true, - "license": "MIT", - "engines": { - "node": "*" - } - }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" - }, - "node_modules/available-typed-arrays": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.6.tgz", - "integrity": "sha512-j1QzY8iPNPG4o4xmO3ptzpRxTciqD3MgEHtifP/YnJpIo58Xu+ne4BejlbkuaLfXn/nz6HFiw29bLpj2PNMdGg==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/axios": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.24.0.tgz", - "integrity": "sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA==", - "dependencies": { - "follow-redirects": "^1.14.4" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "license": "MIT" - }, - "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/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/big-integer": { - "version": "1.6.36", - "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.36.tgz", - "integrity": "sha512-t70bfa7HYEA1D9idDbmuv7YbsbVkQ+Hp+8KFSul4aE5e/i1bjCNIRYJZlA8Q8p0r9T8cF/RVvwUgRA//FydEyg==", - "engines": { - "node": ">=0.6" - } - }, - "node_modules/bigint-buffer": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/bigint-buffer/-/bigint-buffer-1.1.5.tgz", - "integrity": "sha512-trfYco6AoZ+rKhKnxA0hgX0HAbVP/s808/EuDSe2JDzUnCp/xAsli35Orvk67UrTEcwuxZqYZDmfA2RXJgxVvA==", - "hasInstallScript": true, - "dependencies": { - "bindings": "^1.3.0" - }, - "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/bignumber.js": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz", - "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==", - "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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/binary-parser": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/binary-parser/-/binary-parser-2.2.1.tgz", - "integrity": "sha512-5ATpz/uPDgq5GgEDxTB4ouXCde7q2lqAQlSdBRQVl/AJnxmQmhIfyxJx+0MGu//D5rHQifkfGbWWlaysG0o9NA==", - "engines": { - "node": ">=12" - } - }, - "node_modules/bindings": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", - "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", - "dependencies": { - "file-uri-to-path": "1.0.0" - } - }, - "node_modules/bip32": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/bip32/-/bip32-2.0.6.tgz", - "integrity": "sha512-HpV5OMLLGTjSVblmrtYRfFFKuQB+GArM0+XP8HGWfJ5vxYBqo+DesvJwOdC2WJ3bCkZShGf0QIfoIpeomVzVdA==", - "dependencies": { - "@types/node": "10.12.18", - "bs58check": "^2.1.1", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "tiny-secp256k1": "^1.1.3", - "typeforce": "^1.11.5", - "wif": "^2.0.6" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/bip32/node_modules/@types/node": { - "version": "10.12.18", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.18.tgz", - "integrity": "sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ==" - }, - "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/bip66": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/bip66/-/bip66-1.1.5.tgz", - "integrity": "sha512-nemMHz95EmS38a26XbbdxIYj5csHd3RMP3H5bwQknX0WYHF01qhpufP42mLOwVICuH2JmhIhXiWs89MfUGL7Xw==", - "optional": true, - "dependencies": { - "safe-buffer": "^5.0.1" - } - }, - "node_modules/blakejs": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.2.1.tgz", - "integrity": "sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ==" - }, - "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/borsh": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/borsh/-/borsh-0.7.0.tgz", - "integrity": "sha512-CLCsZGIBCFnPtkNnieW/a8wmreDmfUtjU2m9yHrzPXIlNbqVs0AQrSatSG6vdNYUqdc83tkQi2eHfF98ubzQLA==", - "dependencies": { - "bn.js": "^5.2.0", - "bs58": "^4.0.0", - "text-encoding-utf-8": "^1.0.2" - } - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "license": "MIT", - "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/browser-headers": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/browser-headers/-/browser-headers-0.4.1.tgz", - "integrity": "sha512-CA9hsySZVo9371qEHjHZtYxV2cFtVj5Wj/ZHi8ooEsrtm4vOnl9Y9HmyYWk9q+05d7K3rdoAE0j3MVEFVvtQtg==" - }, - "node_modules/browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true, - "license": "ISC" - }, - "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/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/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/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/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==", - "dev": true, - "license": "MIT" - }, - "node_modules/buffer-layout": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/buffer-layout/-/buffer-layout-1.2.2.tgz", - "integrity": "sha512-kWSuLN694+KTk8SrYvCqwP2WcgQjoRCiF5b4QDvkkz8EmgD+aWAIceGFKMIAdmF/pH+vpgNV3d3kAKorcdAmWA==", - "engines": { - "node": ">=4.5" - } - }, - "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/bufferutil": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.8.tgz", - "integrity": "sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw==", - "hasInstallScript": true, - "dependencies": { - "node-gyp-build": "^4.3.0" - }, - "engines": { - "node": ">=6.14.2" - } - }, - "node_modules/builtin-modules": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", - "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==", - "dev": true, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/builtins": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz", - "integrity": "sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==", - "dev": true, - "dependencies": { - "semver": "^7.0.0" - } - }, - "node_modules/call-bind": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.6.tgz", - "integrity": "sha512-Mj50FLHtlsoVfRfnHaZvyrooHcrlceNZdL/QBvJJVd9Ta55qCQK0gs4ss2oZDeV9zFCs6ewzYgVE5yfVmfFpVg==", - "dev": true, - "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.3", - "set-function-length": "^1.2.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/capability": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/capability/-/capability-0.2.5.tgz", - "integrity": "sha512-rsJZYVCgXd08sPqwmaIqjAd5SUTfonV0z/gDJ8D6cN8wQphky1kkAYEqQ+hmDxTw7UihvBfjUVUSY+DBEe44jg==" - }, - "node_modules/chai": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.4.1.tgz", - "integrity": "sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==", - "dev": true, - "license": "MIT", - "dependencies": { - "assertion-error": "^1.1.0", - "check-error": "^1.0.3", - "deep-eql": "^4.1.3", - "get-func-name": "^2.0.2", - "loupe": "^2.3.6", - "pathval": "^1.1.1", - "type-detect": "^4.0.8" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/chalk/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/check-error": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", - "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", - "dev": true, - "license": "MIT", - "dependencies": { - "get-func-name": "^2.0.2" - }, - "engines": { - "node": "*" - } - }, - "node_modules/chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "license": "MIT", - "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" - }, - "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/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "devOptional": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "devOptional": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "devOptional": true, - "license": "MIT" - }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "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-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "license": "MIT" - }, - "node_modules/copyfiles": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/copyfiles/-/copyfiles-2.4.1.tgz", - "integrity": "sha512-fereAvAvxDrQDOXybk3Qu3dPbOoKoysFMWtkY3mv5BsL8//OSZVL5DCLYqgRfY5cWirgRzlC+WSrxp6Bo3eNZg==", - "optional": true, - "dependencies": { - "glob": "^7.0.5", - "minimatch": "^3.0.3", - "mkdirp": "^1.0.4", - "noms": "0.0.0", - "through2": "^2.0.1", - "untildify": "^4.0.0", - "yargs": "^16.1.0" - }, - "bin": { - "copyfiles": "copyfiles", - "copyup": "copyfiles" - } - }, - "node_modules/copyfiles/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "optional": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/copyfiles/node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "optional": true, - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } - }, - "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==", - "optional": true - }, - "node_modules/cosmjs-types": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/cosmjs-types/-/cosmjs-types-0.7.2.tgz", - "integrity": "sha512-vf2uLyktjr/XVAgEq0DjMxeAWh1yYREe7AMHDKd7EiHVqxBPCaBS+qEEQUkXbR9ndnckqr1sUG8BQhazh4X5lA==", - "optional": true, - "dependencies": { - "long": "^4.0.0", - "protobufjs": "~6.11.2" - } - }, - "node_modules/cosmjs-types/node_modules/protobufjs": { - "version": "6.11.4", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.4.tgz", - "integrity": "sha512-5kQWPaJHi1WoCpjTGszzQ32PG2F4+wRY6BmAT4Vfw56Q2FZ4YZzK20xUYQH4YkfehY1e6QSICrJquM6xXZNcrw==", - "hasInstallScript": true, - "optional": true, - "dependencies": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/long": "^4.0.1", - "@types/node": ">=13.7.0", - "long": "^4.0.0" - }, - "bin": { - "pbjs": "bin/pbjs", - "pbts": "bin/pbts" - } - }, - "node_modules/crc-32": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", - "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==", - "optional": true, - "bin": { - "crc32": "bin/crc32.njs" - }, - "engines": { - "node": ">=0.8" - } - }, - "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/cross-fetch": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.8.tgz", - "integrity": "sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==", - "license": "MIT", - "dependencies": { - "node-fetch": "^2.6.12" - } - }, - "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/crypto-addr-codec": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/crypto-addr-codec/-/crypto-addr-codec-0.1.8.tgz", - "integrity": "sha512-GqAK90iLLgP3FvhNmHbpT3wR6dEdaM8hZyZtLX29SPardh3OA13RFLHDR6sntGCgRWOfiHqW6sIyohpNqOtV/g==", - "dependencies": { - "base-x": "^3.0.8", - "big-integer": "1.6.36", - "blakejs": "^1.1.0", - "bs58": "^4.0.1", - "ripemd160-min": "0.0.6", - "safe-buffer": "^5.2.0", - "sha3": "^2.1.1" - } - }, - "node_modules/crypto-hash": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/crypto-hash/-/crypto-hash-1.3.0.tgz", - "integrity": "sha512-lyAZ0EMyjDkVvz8WOeVnuCPvKVBXcMv1l5SVqO1yC7PzTwrD/pPje/BIRbWhMoPe436U+Y2nD7f5bFx0kt+Sbg==", - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/debug": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", - "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/debug/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true, - "license": "MIT" - }, - "node_modules/decamelize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/decimal.js": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", - "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==" - }, - "node_modules/deep-eql": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", - "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", - "dev": true, - "license": "MIT", - "dependencies": { - "type-detect": "^4.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true - }, - "node_modules/define-data-property": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.2.tgz", - "integrity": "sha512-SRtsSqsDbgpJBbW3pABMCOt6rQyeM8s8RiyeSN8jYG8sYmt/kGJejbydttUsnDs1tadr19tvhT4ShwMyoqAm4g==", - "devOptional": true, - "dependencies": { - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.2", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/define-properties": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", - "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", - "devOptional": true, - "dependencies": { - "define-data-property": "^1.0.1", - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/delay": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/delay/-/delay-5.0.0.tgz", - "integrity": "sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "engines": { - "node": ">=0.4.0" - } - }, - "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/diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/dot-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz", - "integrity": "sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==", - "license": "MIT", - "dependencies": { - "no-case": "^3.0.4", - "tslib": "^2.0.3" - } - }, - "node_modules/dotenv": { - "version": "16.4.5", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", - "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://dotenvx.com" - } - }, - "node_modules/drbg.js": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/drbg.js/-/drbg.js-1.0.1.tgz", - "integrity": "sha512-F4wZ06PvqxYLFEZKkFxTDcns9oFNk34hvmJSEwdzsxVQ8YI5YaxtACgQatkYgv2VI2CFkUd2Y+xosPQnHv809g==", - "optional": true, - "dependencies": { - "browserify-aes": "^1.0.6", - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/eccrypto": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/eccrypto/-/eccrypto-1.1.6.tgz", - "integrity": "sha512-d78ivVEzu7Tn0ZphUUaL43+jVPKTMPFGtmgtz1D0LrFn7cY3K8CdrvibuLz2AAkHBLKZtR8DMbB2ukRYFk987A==", - "hasInstallScript": true, - "optional": true, - "dependencies": { - "acorn": "7.1.1", - "elliptic": "6.5.4", - "es6-promise": "4.2.8", - "nan": "2.14.0" - }, - "optionalDependencies": { - "secp256k1": "3.7.1" - } - }, - "node_modules/eccrypto/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==", - "optional": true - }, - "node_modules/eccrypto/node_modules/secp256k1": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-3.7.1.tgz", - "integrity": "sha512-1cf8sbnRreXrQFdH6qsg2H71Xw91fCCS9Yp021GnUNJzWJS/py96fS4lHbnTnouLp08Xj6jBoBB6V78Tdbdu5g==", - "hasInstallScript": true, - "optional": true, - "dependencies": { - "bindings": "^1.5.0", - "bip66": "^1.1.5", - "bn.js": "^4.11.8", - "create-hash": "^1.2.0", - "drbg.js": "^1.0.1", - "elliptic": "^6.4.1", - "nan": "^2.14.0", - "safe-buffer": "^5.1.2" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "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/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "devOptional": true, - "license": "MIT" - }, - "node_modules/error-polyfill": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/error-polyfill/-/error-polyfill-0.1.3.tgz", - "integrity": "sha512-XHJk60ufE+TG/ydwp4lilOog549iiQF2OAPhkk9DdiYWMrltz5yhDz/xnKuenNwP7gy3dsibssO5QpVhkrSzzg==", - "dependencies": { - "capability": "^0.2.5", - "o3": "^1.0.3", - "u3": "^0.1.1" - } - }, - "node_modules/es-abstract": { - "version": "1.22.3", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.3.tgz", - "integrity": "sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==", - "dev": true, - "dependencies": { - "array-buffer-byte-length": "^1.0.0", - "arraybuffer.prototype.slice": "^1.0.2", - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.5", - "es-set-tostringtag": "^2.0.1", - "es-to-primitive": "^1.2.1", - "function.prototype.name": "^1.1.6", - "get-intrinsic": "^1.2.2", - "get-symbol-description": "^1.0.0", - "globalthis": "^1.0.3", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0", - "internal-slot": "^1.0.5", - "is-array-buffer": "^3.0.2", - "is-callable": "^1.2.7", - "is-negative-zero": "^2.0.2", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.2", - "is-string": "^1.0.7", - "is-typed-array": "^1.1.12", - "is-weakref": "^1.0.2", - "object-inspect": "^1.13.1", - "object-keys": "^1.1.1", - "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.5.1", - "safe-array-concat": "^1.0.1", - "safe-regex-test": "^1.0.0", - "string.prototype.trim": "^1.2.8", - "string.prototype.trimend": "^1.0.7", - "string.prototype.trimstart": "^1.0.7", - "typed-array-buffer": "^1.0.0", - "typed-array-byte-length": "^1.0.0", - "typed-array-byte-offset": "^1.0.0", - "typed-array-length": "^1.0.4", - "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.13" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/es-array-method-boxes-properly": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz", - "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==", - "dev": true - }, - "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==", - "devOptional": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-set-tostringtag": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.2.tgz", - "integrity": "sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==", - "dev": true, - "dependencies": { - "get-intrinsic": "^1.2.2", - "has-tostringtag": "^1.0.0", - "hasown": "^2.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-shim-unscopables": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz", - "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==", - "dev": true, - "dependencies": { - "hasown": "^2.0.0" - } - }, - "node_modules/es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "dependencies": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/es6-promise": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", - "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" - }, - "node_modules/es6-promisify": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", - "integrity": "sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ==", - "dependencies": { - "es6-promise": "^4.0.3" - } - }, - "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "devOptional": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint": { - "version": "8.56.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz", - "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==", - "dev": true, - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.56.0", - "@humanwhocodes/config-array": "^0.11.13", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-compat-utils": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/eslint-compat-utils/-/eslint-compat-utils-0.1.2.tgz", - "integrity": "sha512-Jia4JDldWnFNIru1Ehx1H5s9/yxiRHY/TimCuUc0jNexew3cF1gI6CYZil1ociakfWO3rRqFjl1mskBblB3RYg==", - "dev": true, - "engines": { - "node": ">=12" - }, - "peerDependencies": { - "eslint": ">=6.0.0" - } - }, - "node_modules/eslint-config-standard": { - "version": "17.1.0", - "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-17.1.0.tgz", - "integrity": "sha512-IwHwmaBNtDK4zDHQukFDW5u/aTb8+meQWZvNFWkiGmbWjD6bqyuSSBxxXKkCftCUzc1zwCH2m/baCNDLGmuO5Q==", - "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" - } - ], - "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "eslint": "^8.0.1", - "eslint-plugin-import": "^2.25.2", - "eslint-plugin-n": "^15.0.0 || ^16.0.0 ", - "eslint-plugin-promise": "^6.0.0" - } - }, - "node_modules/eslint-config-standard-with-typescript": { - "version": "43.0.1", - "resolved": "https://registry.npmjs.org/eslint-config-standard-with-typescript/-/eslint-config-standard-with-typescript-43.0.1.tgz", - "integrity": "sha512-WfZ986+qzIzX6dcr4yGUyVb/l9N3Z8wPXCc5z/70fljs3UbWhhV+WxrfgsqMToRzuuyX9MqZ974pq2UPhDTOcA==", - "dev": true, - "dependencies": { - "@typescript-eslint/parser": "^6.4.0", - "eslint-config-standard": "17.1.0" - }, - "peerDependencies": { - "@typescript-eslint/eslint-plugin": "^6.4.0", - "eslint": "^8.0.1", - "eslint-plugin-import": "^2.25.2", - "eslint-plugin-n": "^15.0.0 || ^16.0.0 ", - "eslint-plugin-promise": "^6.0.0", - "typescript": "*" - } - }, - "node_modules/eslint-import-resolver-node": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", - "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", - "dev": true, - "dependencies": { - "debug": "^3.2.7", - "is-core-module": "^2.13.0", - "resolve": "^1.22.4" - } - }, - "node_modules/eslint-import-resolver-node/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-module-utils": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz", - "integrity": "sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==", - "dev": true, - "dependencies": { - "debug": "^3.2.7" - }, - "engines": { - "node": ">=4" - }, - "peerDependenciesMeta": { - "eslint": { - "optional": true - } - } - }, - "node_modules/eslint-module-utils/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-plugin-es-x": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-es-x/-/eslint-plugin-es-x-7.5.0.tgz", - "integrity": "sha512-ODswlDSO0HJDzXU0XvgZ3lF3lS3XAZEossh15Q2UHjwrJggWeBoKqqEsLTZLXl+dh5eOAozG0zRcYtuE35oTuQ==", - "dev": true, - "dependencies": { - "@eslint-community/eslint-utils": "^4.1.2", - "@eslint-community/regexpp": "^4.6.0", - "eslint-compat-utils": "^0.1.2" - }, - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ota-meshi" - }, - "peerDependencies": { - "eslint": ">=8" - } - }, - "node_modules/eslint-plugin-import": { - "version": "2.29.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz", - "integrity": "sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==", - "dev": true, - "dependencies": { - "array-includes": "^3.1.7", - "array.prototype.findlastindex": "^1.2.3", - "array.prototype.flat": "^1.3.2", - "array.prototype.flatmap": "^1.3.2", - "debug": "^3.2.7", - "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.9", - "eslint-module-utils": "^2.8.0", - "hasown": "^2.0.0", - "is-core-module": "^2.13.1", - "is-glob": "^4.0.3", - "minimatch": "^3.1.2", - "object.fromentries": "^2.0.7", - "object.groupby": "^1.0.1", - "object.values": "^1.1.7", - "semver": "^6.3.1", - "tsconfig-paths": "^3.15.0" - }, - "engines": { - "node": ">=4" - }, - "peerDependencies": { - "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" - } - }, - "node_modules/eslint-plugin-import/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-plugin-import/node_modules/doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/eslint-plugin-import/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/eslint-plugin-import/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/eslint-plugin-n": { - "version": "16.6.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-16.6.2.tgz", - "integrity": "sha512-6TyDmZ1HXoFQXnhCTUjVFULReoBPOAjpuiKELMkeP40yffI/1ZRO+d9ug/VC6fqISo2WkuIBk3cvuRPALaWlOQ==", - "dev": true, - "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "builtins": "^5.0.1", - "eslint-plugin-es-x": "^7.5.0", - "get-tsconfig": "^4.7.0", - "globals": "^13.24.0", - "ignore": "^5.2.4", - "is-builtin-module": "^3.2.1", - "is-core-module": "^2.12.1", - "minimatch": "^3.1.2", - "resolve": "^1.22.2", - "semver": "^7.5.3" - }, - "engines": { - "node": ">=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=7.0.0" - } - }, - "node_modules/eslint-plugin-n/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/eslint-plugin-promise": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.1.1.tgz", - "integrity": "sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" - } - }, - "node_modules/eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", - "dev": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/eslint/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", - "dev": true, - "dependencies": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/espree/node_modules/acorn": { - "version": "8.11.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", - "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/esquery": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", - "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", - "dev": true, - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/eth-crypto": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/eth-crypto/-/eth-crypto-2.6.0.tgz", - "integrity": "sha512-GCX4ffFYRUGgnuWR5qxcZIRQJ1KEqPFiyXU9yVy7s6dtXIMlUXZQ2h+5ID6rFaOHWbpJbjfkC6YdhwtwRYCnug==", - "optional": true, - "dependencies": { - "@babel/runtime": "7.20.13", - "@ethereumjs/tx": "3.5.2", - "@types/bn.js": "5.1.1", - "eccrypto": "1.1.6", - "ethereumjs-util": "7.1.5", - "ethers": "5.7.2", - "secp256k1": "5.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/pubkey" - } - }, - "node_modules/eth-crypto/node_modules/@babel/runtime": { - "version": "7.20.13", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.13.tgz", - "integrity": "sha512-gt3PKXs0DBoL9xCvOIIZ2NEqAGZqHjAnmVbfQtB620V0uReIQutpel14KcneZuer7UioY8ALKZ7iocavvzTNFA==", - "optional": true, - "dependencies": { - "regenerator-runtime": "^0.13.11" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/eth-crypto/node_modules/@types/bn.js": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.1.tgz", - "integrity": "sha512-qNrYbZqMx0uJAfKnKclPh+dTwK33KfLHYqtyODwd5HnXOjnkhc4qgn3BrK6RWyGZm5+sIFE7Q7Vz6QQtJB7w7g==", - "optional": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/eth-crypto/node_modules/node-addon-api": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz", - "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==", - "optional": true - }, - "node_modules/eth-crypto/node_modules/regenerator-runtime": { - "version": "0.13.11", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", - "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==", - "optional": true - }, - "node_modules/eth-crypto/node_modules/secp256k1": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-5.0.0.tgz", - "integrity": "sha512-TKWX8xvoGHrxVdqbYeZM9w+izTF4b9z3NhSaDkdn81btvuh+ivbIMGT/zQvDtTFWhRlThpoz6LEYTr7n8A5GcA==", - "hasInstallScript": true, - "optional": true, - "dependencies": { - "elliptic": "^6.5.4", - "node-addon-api": "^5.0.0", - "node-gyp-build": "^4.2.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/ethereum-cryptography": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", - "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", - "dependencies": { - "@types/pbkdf2": "^3.0.0", - "@types/secp256k1": "^4.0.1", - "blakejs": "^1.1.0", - "browserify-aes": "^1.2.0", - "bs58check": "^2.1.2", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "hash.js": "^1.1.7", - "keccak": "^3.0.0", - "pbkdf2": "^3.0.17", - "randombytes": "^2.1.0", - "safe-buffer": "^5.1.2", - "scrypt-js": "^3.0.0", - "secp256k1": "^4.0.1", - "setimmediate": "^1.0.5" - } - }, - "node_modules/ethereumjs-abi": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz", - "integrity": "sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA==", - "optional": true, - "dependencies": { - "bn.js": "^4.11.8", - "ethereumjs-util": "^6.0.0" - } - }, - "node_modules/ethereumjs-abi/node_modules/@types/bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", - "optional": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/ethereumjs-abi/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==", - "optional": true - }, - "node_modules/ethereumjs-abi/node_modules/ethereumjs-util": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", - "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", - "optional": true, - "dependencies": { - "@types/bn.js": "^4.11.3", - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "elliptic": "^6.5.2", - "ethereum-cryptography": "^0.1.3", - "ethjs-util": "0.1.6", - "rlp": "^2.2.3" - } - }, - "node_modules/ethereumjs-util": { - "version": "7.1.5", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz", - "integrity": "sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg==", - "dependencies": { - "@types/bn.js": "^5.1.0", - "bn.js": "^5.1.2", - "create-hash": "^1.1.2", - "ethereum-cryptography": "^0.1.3", - "rlp": "^2.2.4" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/ethers": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.7.2.tgz", - "integrity": "sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "optional": true, - "dependencies": { - "@ethersproject/abi": "5.7.0", - "@ethersproject/abstract-provider": "5.7.0", - "@ethersproject/abstract-signer": "5.7.0", - "@ethersproject/address": "5.7.0", - "@ethersproject/base64": "5.7.0", - "@ethersproject/basex": "5.7.0", - "@ethersproject/bignumber": "5.7.0", - "@ethersproject/bytes": "5.7.0", - "@ethersproject/constants": "5.7.0", - "@ethersproject/contracts": "5.7.0", - "@ethersproject/hash": "5.7.0", - "@ethersproject/hdnode": "5.7.0", - "@ethersproject/json-wallets": "5.7.0", - "@ethersproject/keccak256": "5.7.0", - "@ethersproject/logger": "5.7.0", - "@ethersproject/networks": "5.7.1", - "@ethersproject/pbkdf2": "5.7.0", - "@ethersproject/properties": "5.7.0", - "@ethersproject/providers": "5.7.2", - "@ethersproject/random": "5.7.0", - "@ethersproject/rlp": "5.7.0", - "@ethersproject/sha2": "5.7.0", - "@ethersproject/signing-key": "5.7.0", - "@ethersproject/solidity": "5.7.0", - "@ethersproject/strings": "5.7.0", - "@ethersproject/transactions": "5.7.0", - "@ethersproject/units": "5.7.0", - "@ethersproject/wallet": "5.7.0", - "@ethersproject/web": "5.7.1", - "@ethersproject/wordlists": "5.7.0" - } - }, - "node_modules/ethjs-util": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz", - "integrity": "sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==", - "optional": true, - "dependencies": { - "is-hex-prefixed": "1.0.0", - "strip-hex-prefix": "1.0.0" - }, - "engines": { - "node": ">=6.5.0", - "npm": ">=3" - } - }, - "node_modules/eventemitter3": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", - "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==" - }, - "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/eyes": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", - "integrity": "sha512-GipyPsXO1anza0AOZdy69Im7hGFCNB7Y/NGjDlZGJ3GJJLtwNSb2vrzYrTYJRrRloVx7pl+bhUaTB8yiccPvFQ==", - "engines": { - "node": "> 0.1.90" - } - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "node_modules/fast-glob": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", - "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true - }, - "node_modules/fast-stable-stringify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fast-stable-stringify/-/fast-stable-stringify-1.0.0.tgz", - "integrity": "sha512-wpYMUmFu5f00Sm0cj2pfivpmawLZ0NKdviQ4w9zJeR8JVtOpOxHmLaJuj0vxvGqMJQWyP/COUkF75/57OKyRag==" - }, - "node_modules/fastestsmallesttextencoderdecoder": { - "version": "1.0.22", - "resolved": "https://registry.npmjs.org/fastestsmallesttextencoderdecoder/-/fastestsmallesttextencoderdecoder-1.0.22.tgz", - "integrity": "sha512-Pb8d48e+oIuY4MaM64Cd7OW1gt4nxCHs7/ddPPZ/Ic3sg8yVGM7O9wDvZ7us6ScaUupzM+pfBolwtYhN1IxBIw==", - "peer": true - }, - "node_modules/fastq": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", - "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", - "dev": true, - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/file-uri-to-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" - }, - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "dev": true, - "license": "BSD-3-Clause", - "bin": { - "flat": "cli.js" - } - }, - "node_modules/flat-cache": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", - "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", - "dev": true, - "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/flatted": { - "version": "3.2.9", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz", - "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==", - "dev": true - }, - "node_modules/follow-redirects": { - "version": "1.15.5", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", - "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], - "engines": { - "node": ">=4.0" - }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } - } - }, - "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==", - "dev": true, - "dependencies": { - "is-callable": "^1.1.3" - } - }, - "node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "license": "ISC" - }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "license": "MIT", - "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==", - "devOptional": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/function.prototype.name": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", - "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "functions-have-names": "^1.2.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/functions-have-names": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "devOptional": true, - "license": "ISC", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/get-func-name": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", - "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "*" - } - }, - "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==", - "devOptional": true, - "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-symbol-description": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", - "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.5", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-tsconfig": { - "version": "4.7.2", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.2.tgz", - "integrity": "sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A==", - "dev": true, - "dependencies": { - "resolve-pkg-maps": "^1.0.0" - }, - "funding": { - "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" - } - }, - "node_modules/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "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==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/glob/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dev": true, - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/globals/node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/globalthis": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", - "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", - "devOptional": true, - "dependencies": { - "define-properties": "^1.1.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/google-protobuf": { - "version": "3.21.2", - "resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-3.21.2.tgz", - "integrity": "sha512-3MSOYFO5U9mPGikIYCzK0SaThypfGgS6bHqrUGXG3DPHCrb+txNqeEcns1W0lkGfk0rCyNXm7xB9rMxnCiZOoA==" - }, - "node_modules/gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "devOptional": true, - "dependencies": { - "get-intrinsic": "^1.1.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/graphemer": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true - }, - "node_modules/graphql": { - "version": "16.8.1", - "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.8.1.tgz", - "integrity": "sha512-59LZHPdGZVh695Ud9lRzPBVTtlX9ZCV150Er2W43ro37wVof0ctenSaskPPjN7lVTIN8mSZt8PHUNKZuNQUuxw==", - "optional": true, - "engines": { - "node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0" - } - }, - "node_modules/graphql-tag": { - "version": "2.12.6", - "resolved": "https://registry.npmjs.org/graphql-tag/-/graphql-tag-2.12.6.tgz", - "integrity": "sha512-FdSNcu2QQcWnM2VNvSCCDCVS5PpPqpzgFT8+GXzqJuoDd0CBncxCY278u4mhRO7tMgo2JjgJA5aZ+nWSQ/Z+xg==", - "optional": true, - "dependencies": { - "tslib": "^2.1.0" - }, - "engines": { - "node": ">=10" - }, - "peerDependencies": { - "graphql": "^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" - } - }, - "node_modules/growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4.x" - } - }, - "node_modules/has-bigints": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", - "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/has-property-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz", - "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==", - "devOptional": true, - "dependencies": { - "get-intrinsic": "^1.2.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-proto": { - "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==", - "devOptional": true, - "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==", - "devOptional": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-tostringtag": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", - "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", - "dev": true, - "dependencies": { - "has-symbols": "^1.0.3" - }, - "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.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.0", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", - "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", - "devOptional": true, - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true, - "license": "MIT", - "bin": { - "he": "bin/he" - } - }, - "node_modules/hi-base32": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/hi-base32/-/hi-base32-0.5.1.tgz", - "integrity": "sha512-EmBBpvdYh/4XxsnUybsPag6VikPYnN30td+vQk+GI3qpahVEG9+gTkG0aXVxTjBqQ5T6ijbWIu77O+C5WFWsnA==" - }, - "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/hoist-non-react-statics": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", - "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", - "optional": true, - "dependencies": { - "react-is": "^16.7.0" - } - }, - "node_modules/http-errors": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.8.1.tgz", - "integrity": "sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==", - "dependencies": { - "depd": "~1.1.2", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": ">= 1.5.0 < 2", - "toidentifier": "1.0.1" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/http-errors/node_modules/depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/http-status-codes": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/http-status-codes/-/http-status-codes-2.3.0.tgz", - "integrity": "sha512-RJ8XvFvpPM/Dmc5SV+dC4y5PCeOhT3x1Hq0NU3rjGeg5a/CqlhZ7uudknPwZFz4aeAXDcbAyaeP7GAo9lvngtA==", - "optional": true - }, - "node_modules/humanize-ms": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", - "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", - "dependencies": { - "ms": "^2.0.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/ignore": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", - "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "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==", - "license": "ISC" - }, - "node_modules/internal-slot": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", - "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", - "dev": true, - "dependencies": { - "es-errors": "^1.3.0", - "hasown": "^2.0.0", - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/interpret": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", - "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", - "optional": true, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/is-array-buffer": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", - "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-bigint": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", - "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", - "dev": true, - "dependencies": { - "has-bigints": "^1.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-boolean-object": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", - "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-builtin-module": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.1.tgz", - "integrity": "sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==", - "dev": true, - "dependencies": { - "builtin-modules": "^3.3.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "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==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-core-module": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", - "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", - "devOptional": true, - "dependencies": { - "hasown": "^2.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-date-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", - "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "devOptional": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-hex-prefixed": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", - "integrity": "sha512-WvtOiug1VFrE9v1Cydwm+FnXd3+w9GaeVUss5W4v/SLy3UW00vP+6iNF2SdnfiBoLy4bTqVdkftNGTUeOFVsbA==", - "optional": true, - "engines": { - "node": ">=6.5.0", - "npm": ">=3" - } - }, - "node_modules/is-negative-zero": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", - "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-number-object": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", - "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", - "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-regex": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-shared-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", - "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-string": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", - "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", - "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-symbol": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", - "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", - "dev": true, - "dependencies": { - "has-symbols": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-typed-array": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", - "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", - "dev": true, - "dependencies": { - "which-typed-array": "^1.1.14" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-weakref": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", - "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", - "optional": true - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true, - "license": "ISC" - }, - "node_modules/isomorphic-ws": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz", - "integrity": "sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w==", - "peerDependencies": { - "ws": "*" - } - }, - "node_modules/jayson": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/jayson/-/jayson-4.1.0.tgz", - "integrity": "sha512-R6JlbyLN53Mjku329XoRT2zJAE6ZgOQ8f91ucYdMCD4nkGCF9kZSrcGXpHIU4jeKj58zUZke2p+cdQchU7Ly7A==", - "dependencies": { - "@types/connect": "^3.4.33", - "@types/node": "^12.12.54", - "@types/ws": "^7.4.4", - "commander": "^2.20.3", - "delay": "^5.0.0", - "es6-promisify": "^5.0.0", - "eyes": "^0.1.8", - "isomorphic-ws": "^4.0.1", - "json-stringify-safe": "^5.0.1", - "JSONStream": "^1.3.5", - "uuid": "^8.3.2", - "ws": "^7.4.5" - }, - "bin": { - "jayson": "bin/jayson.js" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jayson/node_modules/@types/node": { - "version": "12.20.55", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", - "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==" - }, - "node_modules/js-base64": { - "version": "3.7.6", - "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-3.7.6.tgz", - "integrity": "sha512-NPrWuHFxFUknr1KqJRDgUQPexQF0uIJWjeT+2KjEePhitQxQEx5EJBG1lVn5/hc8aLycTpXrDOgPQ6Zq+EDiTA==" - }, - "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/js-sha3": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", - "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==" - }, - "node_modules/js-sha512": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/js-sha512/-/js-sha512-0.8.0.tgz", - "integrity": "sha512-PWsmefG6Jkodqt+ePTvBZCSMFgN7Clckjd0O7su3I0+BW2QWUTJNzjktHsztGLhncP2h8mcF9V9Y2Ha59pAViQ==" - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "optional": true - }, - "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/jscrypto": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/jscrypto/-/jscrypto-1.0.3.tgz", - "integrity": "sha512-lryZl0flhodv4SZHOqyb1bx5sKcJxj0VBo0Kzb4QMAg3L021IC9uGpl0RCZa+9KJwlRGSK2C80ITcwbe19OKLQ==", - "bin": { - "jscrypto": "bin/cli.js" - } - }, - "node_modules/json-bigint": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz", - "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==", - "dependencies": { - "bignumber.js": "^9.0.0" - } - }, - "node_modules/json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true - }, - "node_modules/json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==" - }, - "node_modules/json5": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", - "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", - "dev": true, - "license": "MIT", - "dependencies": { - "minimist": "^1.2.0" - }, - "bin": { - "json5": "lib/cli.js" - } - }, - "node_modules/jsonparse": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", - "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==", - "engines": [ - "node >= 0.2.0" - ] - }, - "node_modules/jsonschema": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.4.1.tgz", - "integrity": "sha512-S6cATIPVv1z0IlxdN+zUk5EPjkGCdnhN4wVSBlvoUO1tOLJootbo9CquNJmbIh4yikWHiUedhRYrNPn1arpEmQ==", - "optional": true, - "engines": { - "node": "*" - } - }, - "node_modules/JSONStream": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", - "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", - "dependencies": { - "jsonparse": "^1.2.0", - "through": ">=2.2.7 <3" - }, - "bin": { - "JSONStream": "bin.js" - }, - "engines": { - "node": "*" - } - }, - "node_modules/keccak": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.4.tgz", - "integrity": "sha512-3vKuW0jV8J3XNTzvfyicFR5qvxrSAGl7KIhvgOu5cmWwM7tZRj3fMbj/pfIf4be7aznbc+prBWGjywox/g2Y6Q==", - "hasInstallScript": true, - "dependencies": { - "node-addon-api": "^2.0.0", - "node-gyp-build": "^4.2.0", - "readable-stream": "^3.6.0" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/keccak256": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/keccak256/-/keccak256-1.0.6.tgz", - "integrity": "sha512-8GLiM01PkdJVGUhR1e6M/AvWnSqYS0HaERI+K/QtStGDGlSTx2B1zTqZk4Zlqu5TxHJNTxWAdP9Y+WI50OApUw==", - "optional": true, - "dependencies": { - "bn.js": "^5.2.0", - "buffer": "^6.0.3", - "keccak": "^3.0.2" - } - }, - "node_modules/keyv": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", - "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", - "dev": true, - "dependencies": { - "json-buffer": "3.0.1" - } - }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/libsodium": { - "version": "0.7.13", - "resolved": "https://registry.npmjs.org/libsodium/-/libsodium-0.7.13.tgz", - "integrity": "sha512-mK8ju0fnrKXXfleL53vtp9xiPq5hKM0zbDQtcxQIsSmxNgSxqCj6R7Hl9PkrNe2j29T4yoDaF7DJLK9/i5iWUw==", - "optional": true - }, - "node_modules/libsodium-wrappers": { - "version": "0.7.13", - "resolved": "https://registry.npmjs.org/libsodium-wrappers/-/libsodium-wrappers-0.7.13.tgz", - "integrity": "sha512-kasvDsEi/r1fMzKouIDv7B8I6vNmknXwGiYodErGuESoFTohGSKZplFtVxZqHaoQ217AynyIFgnOVRitpHs0Qw==", - "optional": true, - "dependencies": { - "libsodium": "^0.7.13" - } - }, - "node_modules/link-module-alias": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/link-module-alias/-/link-module-alias-1.2.0.tgz", - "integrity": "sha512-ahPjXepbSVKbahTB6LxR//VHm8HPfI+QQygCH+E82spBY4HR5VPJTvlhKBc9F7muVxnS6C1rRfoPOXAbWO/fyw==", - "optional": true, - "dependencies": { - "chalk": "^2.4.1" - }, - "bin": { - "link-module-alias": "index.js" - }, - "engines": { - "node": "> 8.0.0" - } - }, - "node_modules/link-module-alias/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "optional": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/link-module-alias/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "optional": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/link-module-alias/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "optional": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/link-module-alias/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "optional": true - }, - "node_modules/link-module-alias/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "optional": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/link-module-alias/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "optional": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/link-module-alias/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "optional": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "optional": true - }, - "node_modules/lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true - }, - "node_modules/lodash.values": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.values/-/lodash.values-4.3.0.tgz", - "integrity": "sha512-r0RwvdCv8id9TUblb/O7rYPwVy6lerCbcawrfdo9iC/1t1wsNMJknO79WNBgwkH0hIeJ08jmvvESbFpNb4jH0Q==", - "optional": true - }, - "node_modules/log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/long": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", - "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" - }, - "node_modules/loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "optional": true, - "dependencies": { - "js-tokens": "^3.0.0 || ^4.0.0" - }, - "bin": { - "loose-envify": "cli.js" - } - }, - "node_modules/loupe": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", - "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", - "dev": true, - "license": "MIT", - "dependencies": { - "get-func-name": "^2.0.1" - } - }, - "node_modules/lower-case": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz", - "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==", - "license": "MIT", - "dependencies": { - "tslib": "^2.0.3" - } - }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "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==", - "dev": true, - "license": "ISC" - }, - "node_modules/map-obj": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz", - "integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==", - "optional": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "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/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, - "dependencies": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "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.6" - } - }, - "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": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/minimalistic-assert": { - "version": "1.0.1", - "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/minimatch": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-4.2.1.tgz", - "integrity": "sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "devOptional": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", - "dev": true, - "license": "MIT", - "dependencies": { - "minimist": "^1.2.6" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, - "node_modules/mocha": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.2.tgz", - "integrity": "sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@ungap/promise-all-settled": "1.1.2", - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.3", - "debug": "4.3.3", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.2.0", - "growl": "1.10.5", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "4.2.1", - "ms": "2.1.3", - "nanoid": "3.3.1", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "which": "2.0.2", - "workerpool": "6.2.0", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha" - }, - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" - } - }, - "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==", - "license": "MIT" - }, - "node_modules/mustache": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz", - "integrity": "sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==", - "bin": { - "mustache": "bin/mustache" - } - }, - "node_modules/nan": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", - "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==" - }, - "node_modules/nanoid": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz", - "integrity": "sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==", - "dev": true, - "license": "MIT", - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true - }, - "node_modules/near-api-js": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/near-api-js/-/near-api-js-1.1.0.tgz", - "integrity": "sha512-qYKv1mYsaDZc2uYndhS+ttDhR9+60qFc+ZjD6lWsAxr3ZskMjRwPffDGQZYhC7BRDQMe1HEbk6d5mf+TVm0Lqg==", - "dependencies": { - "bn.js": "5.2.1", - "borsh": "^0.7.0", - "bs58": "^4.0.0", - "depd": "^2.0.0", - "error-polyfill": "^0.1.3", - "http-errors": "^1.7.2", - "js-sha256": "^0.9.0", - "mustache": "^4.0.0", - "node-fetch": "^2.6.1", - "text-encoding-utf-8": "^1.0.2", - "tweetnacl": "^1.0.1" - } - }, - "node_modules/no-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz", - "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==", - "license": "MIT", - "dependencies": { - "lower-case": "^2.0.2", - "tslib": "^2.0.3" - } - }, - "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-fetch": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", - "license": "MIT", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "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/noms": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/noms/-/noms-0.0.0.tgz", - "integrity": "sha512-lNDU9VJaOPxUmXcLb+HQFeUgQQPtMI24Gt6hgfuMHRJgMRHMF/qZ4HJD3GDru4sSw9IQl2jPjAYnQrdIeLbwow==", - "optional": true, - "dependencies": { - "inherits": "^2.0.1", - "readable-stream": "~1.0.31" - } - }, - "node_modules/noms/node_modules/readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg==", - "optional": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "node_modules/noms/node_modules/string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==", - "optional": true - }, - "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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/o3": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/o3/-/o3-1.0.3.tgz", - "integrity": "sha512-f+4n+vC6s4ysy7YO7O2gslWZBUu8Qj2i2OUJOvjRxQva7jVjYjB29jrr9NCjmxZQR0gzrOcv1RnqoYOeMs5VRQ==", - "dependencies": { - "capability": "^0.2.5" - } - }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "optional": true, - "engines": { - "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==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "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==", - "devOptional": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.assign": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", - "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.5", - "define-properties": "^1.2.1", - "has-symbols": "^1.0.3", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.fromentries": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.7.tgz", - "integrity": "sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.groupby": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.2.tgz", - "integrity": "sha512-bzBq58S+x+uo0VjurFT0UktpKHOZmv4/xePiOA1nbB9pMqpGK7rUPNgf+1YC+7mE+0HzhTMqNUuCqvKhj6FnBw==", - "dev": true, - "dependencies": { - "array.prototype.filter": "^1.0.3", - "call-bind": "^1.0.5", - "define-properties": "^1.2.1", - "es-abstract": "^1.22.3", - "es-errors": "^1.0.0" - } - }, - "node_modules/object.values": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.7.tgz", - "integrity": "sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/optimism": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/optimism/-/optimism-0.18.0.tgz", - "integrity": "sha512-tGn8+REwLRNFnb9WmcY5IfpOqeX2kpaYJ1s6Ae3mn12AeydLkR3j+jSCmVQFoXqU8D41PAJ1RG1rCRNWmNZVmQ==", - "optional": true, - "dependencies": { - "@wry/caches": "^1.0.0", - "@wry/context": "^0.7.0", - "@wry/trie": "^0.4.3", - "tslib": "^2.3.0" - } - }, - "node_modules/optimism/node_modules/@wry/trie": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@wry/trie/-/trie-0.4.3.tgz", - "integrity": "sha512-I6bHwH0fSf6RqQcnnXLJKhkSXG45MFral3GxPaY4uAl0LYDZM+YDVDAiU9bYwjTuysy1S0IeecWtmq1SZA3M1w==", - "optional": true, - "dependencies": { - "tslib": "^2.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/optionator": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", - "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", - "dev": true, - "dependencies": { - "@aashutoshrathi/word-wrap": "^1.2.3", - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pako": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz", - "integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==", - "license": "(MIT AND Zlib)" - }, - "node_modules/parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "devOptional": true - }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/pathval": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", - "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "*" - } - }, - "node_modules/pbkdf2": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", - "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", - "dependencies": { - "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.12" - } - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/prettier": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", - "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", - "dev": true, - "license": "MIT", - "bin": { - "prettier": "bin-prettier.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "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==", - "optional": true - }, - "node_modules/prop-types": { - "version": "15.8.1", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", - "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", - "optional": true, - "dependencies": { - "loose-envify": "^1.4.0", - "object-assign": "^4.1.1", - "react-is": "^16.13.1" - } - }, - "node_modules/protobufjs": { - "version": "7.2.6", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.6.tgz", - "integrity": "sha512-dgJaEDDL6x8ASUZ1YqWciTRrdOuYNzoOf27oHNfdyvKqHr5i0FV7FSLU+aIeFjyFgVxrpTOtQUi0BLLBymZaBw==", - "hasInstallScript": true, - "dependencies": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/node": ">=13.7.0", - "long": "^5.0.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/protobufjs/node_modules/long": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", - "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" - }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "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/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "license": "MIT", - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, - "node_modules/react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "optional": true - }, - "node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "license": "MIT", - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/readonly-date": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/readonly-date/-/readonly-date-1.0.0.tgz", - "integrity": "sha512-tMKIV7hlk0h4mO3JTmmVuIlJVXjKk3Sep9Bf5OH0O+758ruuVkUy2J9SttDLm91IEX/WHlXPSpxMGjPj4beMIQ==", - "optional": true - }, - "node_modules/rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==", - "optional": true, - "dependencies": { - "resolve": "^1.1.6" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/regenerator-runtime": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", - "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" - }, - "node_modules/regexp.prototype.flags": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz", - "integrity": "sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "set-function-name": "^2.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/rehackt": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/rehackt/-/rehackt-0.0.4.tgz", - "integrity": "sha512-xFroSGCbMEK/cTJVhq+c8l/AzIeMeojVyLqtZmr2jmIAFvePjapkCSGg9MnrcNk68HPaMxGf+Ndqozotu78ITw==", - "optional": true, - "peerDependencies": { - "@types/react": "*", - "react": "*" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "react": { - "optional": true - } - } - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "devOptional": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/resolve": { - "version": "1.22.8", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", - "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", - "devOptional": true, - "dependencies": { - "is-core-module": "^2.13.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/resolve-pkg-maps": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", - "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", - "dev": true, - "funding": { - "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" - } - }, - "node_modules/response-iterator": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/response-iterator/-/response-iterator-0.2.6.tgz", - "integrity": "sha512-pVzEEzrsg23Sh053rmDUvLSkGXluZio0qu8VT6ukrYuvtjVfCbDZH9d6PGXb8HZfzdNZt8feXv/jvUzlhRgLnw==", - "optional": true, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true, - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/ripemd160": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", - "dependencies": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, - "node_modules/ripemd160-min": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/ripemd160-min/-/ripemd160-min-0.0.6.tgz", - "integrity": "sha512-+GcJgQivhs6S9qvLogusiTcS9kQUfgR75whKuy5jIhuiOfQuJ8fjqxV6EGD5duH1Y/FawFUMtMhyeq3Fbnib8A==", - "engines": { - "node": ">=8" - } - }, - "node_modules/rlp": { - "version": "2.2.7", - "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.7.tgz", - "integrity": "sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ==", - "dependencies": { - "bn.js": "^5.2.0" - }, - "bin": { - "rlp": "bin/rlp" - } - }, - "node_modules/rpc-websockets": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/rpc-websockets/-/rpc-websockets-7.9.0.tgz", - "integrity": "sha512-DwKewQz1IUA5wfLvgM8wDpPRcr+nWSxuFxx5CbrI2z/MyyZ4nXLM86TvIA+cI1ZAdqC8JIBR1mZR55dzaLU+Hw==", - "dependencies": { - "@babel/runtime": "^7.17.2", - "eventemitter3": "^4.0.7", - "uuid": "^8.3.2", - "ws": "^8.5.0" - }, - "funding": { - "type": "paypal", - "url": "https://paypal.me/kozjak" - }, - "optionalDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - } - }, - "node_modules/rpc-websockets/node_modules/ws": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", - "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": ">=5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "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" - } - ], - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/rxjs": { - "version": "7.8.1", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", - "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", - "dependencies": { - "tslib": "^2.1.0" - } - }, - "node_modules/safe-array-concat": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.0.tgz", - "integrity": "sha512-ZdQ0Jeb9Ofti4hbt5lX3T2JcAamT9hfzYU1MNB+z/jaEbB6wfFfPIR/zEORmZqobkCCJhSjodobH6WHNmJ97dg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.5", - "get-intrinsic": "^1.2.2", - "has-symbols": "^1.0.3", - "isarray": "^2.0.5" - }, - "engines": { - "node": ">=0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/safe-array-concat/node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/safe-regex-test": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", - "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.6", - "es-errors": "^1.3.0", - "is-regex": "^1.1.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/scrypt-js": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", - "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==" - }, - "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/semver": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", - "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "randombytes": "^2.1.0" - } - }, - "node_modules/set-function-length": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.1.tgz", - "integrity": "sha512-j4t6ccc+VsKwYHso+kElc5neZpjtq9EnRICFZtWyBsLojhmeF/ZBd/elqm22WJh/BziDe/SBiOeAt0m2mfLD0g==", - "dev": true, - "dependencies": { - "define-data-property": "^1.1.2", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.3", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/set-function-name": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz", - "integrity": "sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==", - "dev": true, - "dependencies": { - "define-data-property": "^1.0.1", - "functions-have-names": "^1.2.3", - "has-property-descriptors": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==" - }, - "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/sha3": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/sha3/-/sha3-2.1.4.tgz", - "integrity": "sha512-S8cNxbyb0UGUM2VhRD4Poe5N58gJnJsLJ5vC7FYWGUmGhcsj4++WaIOBFVDxlG0W3To6xBuiRh+i0Qp2oNCOtg==", - "dependencies": { - "buffer": "6.0.3" - } - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/shelljs": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", - "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", - "optional": true, - "dependencies": { - "glob": "^7.0.0", - "interpret": "^1.0.0", - "rechoir": "^0.6.2" - }, - "bin": { - "shjs": "bin/shjs" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/shx": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/shx/-/shx-0.3.4.tgz", - "integrity": "sha512-N6A9MLVqjxZYcVn8hLmtneQWIJtp8IKzMP4eMnx+nqkvXoqinUPCbUFLp2UcWTEIUONhlk0ewxr/jaVGlc+J+g==", - "optional": true, - "dependencies": { - "minimist": "^1.2.3", - "shelljs": "^0.8.5" - }, - "bin": { - "shx": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/side-channel": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.5.tgz", - "integrity": "sha512-QcgiIWV4WV7qWExbN5llt6frQB/lBven9pqliLXfGPB+K9ZYXxDozp0wLkHS24kWCm+6YXH/f0HhnObZnZOBnQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.6", - "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/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/snake-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/snake-case/-/snake-case-3.0.4.tgz", - "integrity": "sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==", - "license": "MIT", - "dependencies": { - "dot-case": "^3.0.4", - "tslib": "^2.0.3" - } - }, - "node_modules/snakecase-keys": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/snakecase-keys/-/snakecase-keys-5.5.0.tgz", - "integrity": "sha512-r3kRtnoPu3FxGJ3fny6PKNnU3pteb29o6qAa0ugzhSseKNWRkw1dw8nIjXMyyKaU9vQxxVIE62Mb3bKbdrgpiw==", - "optional": true, - "dependencies": { - "map-obj": "^4.1.0", - "snake-case": "^3.0.4", - "type-fest": "^3.12.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, - "license": "MIT", - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/store2": { - "version": "2.14.2", - "resolved": "https://registry.npmjs.org/store2/-/store2-2.14.2.tgz", - "integrity": "sha512-siT1RiqlfQnGqgT/YzXVUNsom9S0H1OX+dpdGN1xkyYATo4I6sep5NmsRD/40s3IIOvlCq6akxkqG82urIZW1w==", - "optional": true - }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "devOptional": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/string.prototype.trim": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz", - "integrity": "sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimend": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz", - "integrity": "sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimstart": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz", - "integrity": "sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "devOptional": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/strip-hex-prefix": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz", - "integrity": "sha512-q8d4ue7JGEiVcypji1bALTos+0pWtyGlivAWyPuTkHzuTCJqrK9sWxYQZUq6Nq3cuyv3bm734IhHvHtGGURU6A==", - "optional": true, - "dependencies": { - "is-hex-prefixed": "1.0.0" - }, - "engines": { - "node": ">=6.5.0", - "npm": ">=3" - } - }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/superstruct": { - "version": "0.15.5", - "resolved": "https://registry.npmjs.org/superstruct/-/superstruct-0.15.5.tgz", - "integrity": "sha512-4AOeU+P5UuE/4nOUkmcQdW5y7i9ndt1cQd/3iUe+LTz3RxESf/W/5lg4B74HbDMMv8PHnPnGCQFH45kBcrQYoQ==", - "license": "MIT" - }, - "node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "devOptional": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/symbol-observable": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-4.0.0.tgz", - "integrity": "sha512-b19dMThMV4HVFynSAM1++gBHAbk2Tc/osgLIBZMKsyqh34jb2e8Os7T6ZW/Bt3pJFdBTd2JwAnAAEQV7rSNvcQ==", - "optional": true, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/text-encoding-utf-8": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/text-encoding-utf-8/-/text-encoding-utf-8-1.0.2.tgz", - "integrity": "sha512-8bw4MY9WjdsD2aMtO0OzOCY3pXGYNx2d2FfHRVUKkiCPDWjKuOlhLVASS+pD7VkLTVjW268LYJHwsnPFlBpbAg==" - }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true - }, - "node_modules/through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==" - }, - "node_modules/through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "optional": true, - "dependencies": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "node_modules/through2/node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "optional": true - }, - "node_modules/through2/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==", - "optional": true, - "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/through2/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==", - "optional": true - }, - "node_modules/through2/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==", - "optional": true, - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "node_modules/tiny-secp256k1": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/tiny-secp256k1/-/tiny-secp256k1-1.1.6.tgz", - "integrity": "sha512-FmqJZGduTyvsr2cF3375fqGHUovSwDi/QytexX1Se4BPuPZpTE5Ftp5fg+EFSuEf3lhZqgCRjEG3ydUQ/aNiwA==", - "hasInstallScript": true, - "dependencies": { - "bindings": "^1.3.0", - "bn.js": "^4.11.8", - "create-hmac": "^1.1.7", - "elliptic": "^6.4.0", - "nan": "^2.13.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/tiny-secp256k1/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/tmp": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", - "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", - "dependencies": { - "rimraf": "^3.0.0" - }, - "engines": { - "node": ">=8.17.0" - } - }, - "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==", - "dev": true, - "license": "MIT", - "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/toml": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/toml/-/toml-3.0.0.tgz", - "integrity": "sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w==", - "license": "MIT" - }, - "node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "license": "MIT" - }, - "node_modules/ts-api-utils": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.2.1.tgz", - "integrity": "sha512-RIYA36cJn2WiH9Hy77hdF9r7oEwxAtB/TS9/S4Qd90Ap4z5FSiin5zEiTL44OII1Y3IIlEvxwxFUVgrHSZ/UpA==", - "dev": true, - "engines": { - "node": ">=16" - }, - "peerDependencies": { - "typescript": ">=4.2.0" - } - }, - "node_modules/ts-invariant": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/ts-invariant/-/ts-invariant-0.10.3.tgz", - "integrity": "sha512-uivwYcQaxAucv1CzRp2n/QdYPo4ILf9VXgH19zEIjFx2EJufV16P0JtJVpYHy89DItG6Kwj2oIUjrcK5au+4tQ==", - "optional": true, - "dependencies": { - "tslib": "^2.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/ts-mocha": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/ts-mocha/-/ts-mocha-10.0.0.tgz", - "integrity": "sha512-VRfgDO+iiuJFlNB18tzOfypJ21xn2xbuZyDvJvqpTbWgkAgD17ONGr8t+Tl8rcBtOBdjXp5e/Rk+d39f7XBHRw==", - "dev": true, - "license": "MIT", - "dependencies": { - "ts-node": "7.0.1" - }, - "bin": { - "ts-mocha": "bin/ts-mocha" - }, - "engines": { - "node": ">= 6.X.X" - }, - "optionalDependencies": { - "tsconfig-paths": "^3.5.0" - }, - "peerDependencies": { - "mocha": "^3.X.X || ^4.X.X || ^5.X.X || ^6.X.X || ^7.X.X || ^8.X.X || ^9.X.X || ^10.X.X" - } - }, - "node_modules/ts-node": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-7.0.1.tgz", - "integrity": "sha512-BVwVbPJRspzNh2yfslyT1PSbl5uIk03EZlb493RKHN4qej/D06n1cEhjlOJG69oFsE7OT8XjpTUcYf6pKTLMhw==", - "dev": true, - "license": "MIT", - "dependencies": { - "arrify": "^1.0.0", - "buffer-from": "^1.1.0", - "diff": "^3.1.0", - "make-error": "^1.1.1", - "minimist": "^1.2.0", - "mkdirp": "^0.5.1", - "source-map-support": "^0.5.6", - "yn": "^2.0.0" - }, - "bin": { - "ts-node": "dist/bin.js" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "node_modules/ts-node/node_modules/diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/tsconfig-paths": { - "version": "3.15.0", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", - "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/json5": "^0.0.29", - "json5": "^1.0.2", - "minimist": "^1.2.6", - "strip-bom": "^3.0.0" - } - }, - "node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", - "license": "0BSD" - }, - "node_modules/tweetnacl": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", - "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==" - }, - "node_modules/tweetnacl-util": { - "version": "0.15.1", - "resolved": "https://registry.npmjs.org/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz", - "integrity": "sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw==", - "optional": true - }, - "node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/type-fest": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.13.1.tgz", - "integrity": "sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g==", - "optional": true, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/typed-array-buffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.1.tgz", - "integrity": "sha512-RSqu1UEuSlrBhHTWC8O9FnPjOduNs4M7rJ4pRKoEjtx1zUNOPN2sSXHLDX+Y2WPbHIxbvg4JFo2DNAEfPIKWoQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.6", - "es-errors": "^1.3.0", - "is-typed-array": "^1.1.13" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/typed-array-byte-length": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz", - "integrity": "sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "has-proto": "^1.0.1", - "is-typed-array": "^1.1.10" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/typed-array-byte-offset": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz", - "integrity": "sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==", - "dev": true, - "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "has-proto": "^1.0.1", - "is-typed-array": "^1.1.10" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/typed-array-length": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", - "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "is-typed-array": "^1.1.9" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "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.4.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.2.tgz", - "integrity": "sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/u3": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/u3/-/u3-0.1.1.tgz", - "integrity": "sha512-+J5D5ir763y+Am/QY6hXNRlwljIeRMZMGs0cT6qqZVVzzT3X3nFPXVyPOFRMOR4kupB0T8JnCdpWdp6Q/iXn3w==" - }, - "node_modules/unbox-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", - "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "has-bigints": "^1.0.2", - "has-symbols": "^1.0.3", - "which-boxed-primitive": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", - "license": "MIT" - }, - "node_modules/untildify": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", - "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", - "optional": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/utf-8-validate": { - "version": "5.0.10", - "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", - "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", - "hasInstallScript": true, - "dependencies": { - "node-gyp-build": "^4.3.0" - }, - "engines": { - "node": ">=6.14.2" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" - }, - "node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/vlq": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/vlq/-/vlq-2.0.4.tgz", - "integrity": "sha512-aodjPa2wPQFkra1G8CzJBTHXhgk3EVSwxSWXNPr1fgdFLUb8kvLV1iEb6rFgasIsjP82HWI6dsb5Io26DDnasA==" - }, - "node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "license": "BSD-2-Clause" - }, - "node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "license": "MIT", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/which-boxed-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", - "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", - "dev": true, - "dependencies": { - "is-bigint": "^1.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "is-symbol": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-typed-array": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.14.tgz", - "integrity": "sha512-VnXFiIW8yNn9kIHN88xvZ4yOWchftKDsRJ8fEPacX/wl1lOvBrhsJ/OeJCXq7B0AaijRuqgzSKalJoPk+D8MPg==", - "dev": true, - "dependencies": { - "available-typed-arrays": "^1.0.6", - "call-bind": "^1.0.5", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-tostringtag": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/wif": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/wif/-/wif-2.0.6.tgz", - "integrity": "sha512-HIanZn1zmduSF+BQhkE+YXIbEiH0xPr1012QbFEGB0xsKqJii0/SqJjyn8dFv6y36kOznMgMB+LGcbZTJ1xACQ==", - "dependencies": { - "bs58check": "<3.0.0" - } - }, - "node_modules/workerpool": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.0.tgz", - "integrity": "sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A==", - "dev": true, - "license": "Apache-2.0" - }, - "node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "devOptional": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "license": "ISC" - }, - "node_modules/ws": { - "version": "7.5.9", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", - "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", - "engines": { - "node": ">=8.3.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, - "node_modules/xstream": { - "version": "11.14.0", - "resolved": "https://registry.npmjs.org/xstream/-/xstream-11.14.0.tgz", - "integrity": "sha512-1bLb+kKKtKPbgTK6i/BaoAn03g47PpFstlbe1BA+y3pNS/LfvcaghS5BFf9+EE1J+KwSQsEpfJvFN5GqFtiNmw==", - "optional": true, - "dependencies": { - "globalthis": "^1.0.1", - "symbol-observable": "^2.0.3" - } - }, - "node_modules/xstream/node_modules/symbol-observable": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-2.0.3.tgz", - "integrity": "sha512-sQV7phh2WCYAn81oAkakC5qjq2Ml0g8ozqz03wOGnx9dDlG1de6yrF+0RAzSJD8fPUow3PTSMf2SAbOGxb93BA==", - "optional": true, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "optional": true, - "engines": { - "node": ">=0.4" - } - }, - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "devOptional": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "devOptional": true, - "license": "MIT", - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-unparser": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", - "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", - "dev": true, - "license": "MIT", - "dependencies": { - "camelcase": "^6.0.0", - "decamelize": "^4.0.0", - "flat": "^5.0.2", - "is-plain-obj": "^2.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs/node_modules/yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", - "devOptional": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "node_modules/yn": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz", - "integrity": "sha512-uTv8J/wiWTgUTg+9vLTi//leUl5vDQS6uii/emeTb2ssY7vl6QWf2fFbIIGjnhjvbdKlU0ed7QPgY1htTC86jQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/zen-observable": { - "version": "0.8.15", - "resolved": "https://registry.npmjs.org/zen-observable/-/zen-observable-0.8.15.tgz", - "integrity": "sha512-PQ2PC7R9rslx84ndNBZB/Dkv8V8fZEpk83RLgXtYd0fwUgEjseMn1Dgajh2x6S8QbZAFa9p2qVCEuYZNgve0dQ==", - "optional": true - }, - "node_modules/zen-observable-ts": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/zen-observable-ts/-/zen-observable-ts-1.2.5.tgz", - "integrity": "sha512-QZWQekv6iB72Naeake9hS1KxHlotfRpe+WGNbNx5/ta+R3DNjVO2bswf63gXlWDcs+EMd7XY8HfVQyP1X6T4Zg==", - "optional": true, - "dependencies": { - "zen-observable": "0.8.15" - } - } - } -} diff --git a/solana/package.json b/solana/package.json index 10ef558ac..afeef0e76 100644 --- a/solana/package.json +++ b/solana/package.json @@ -1,37 +1,74 @@ { - "name": "example-native-token-transfers-solana", - "license": "Apache-2.0", - "scripts": { - "lint:fix": "prettier */*.js \"*/**/*{.js,.ts}\" -w", - "lint": "prettier */*.js \"*/**/*{.js,.ts}\" --check" - }, - "dependencies": { - "@certusone/wormhole-sdk": "^0.10.10", - "@coral-xyz/anchor": "^0.29.0", - "@solana/spl-token": "^0.4.0", - "@solana/web3.js": "^1.90.0", - "@wormhole-foundation/sdk-base": "^0.5.2", - "@wormhole-foundation/sdk-definitions": "^0.5.2", - "dotenv": "^16.4.5", - "sha3": "^2.1.4" - }, - "devDependencies": { - "@stylistic/eslint-plugin": "^1.6.1", - "@stylistic/eslint-plugin-js": "^1.6.1", - "@stylistic/eslint-plugin-ts": "^1.6.1", - "@types/bn.js": "^5.1.0", - "@types/chai": "^4.3.0", - "@types/mocha": "^9.0.0", - "@typescript-eslint/eslint-plugin": "^6.21.0", - "chai": "^4.3.4", - "eslint": "^8.56.0", - "eslint-config-standard-with-typescript": "^43.0.1", - "eslint-plugin-import": "^2.29.1", - "eslint-plugin-n": "^16.6.2", - "eslint-plugin-promise": "^6.1.1", - "mocha": "^9.0.3", - "prettier": "^2.6.2", - "ts-mocha": "^10.0.0", - "typescript": "^5.4.2" + "name": "@wormhole-foundation/sdk-solana-ntt", + "version": "0.0.1-beta.5", + "repository": { + "type": "git", + "url": "git+https://github.com/wormhole-foundation/connect-sdk.git" + }, + "bugs": { + "url": "https://github.com/wormhole-foundation/connect-sdk/issues" + }, + "homepage": "https://github.com/wormhole-foundation/connect-sdk#readme", + "directories": { + "test": "tests" + }, + "license": "Apache-2.0", + "main": "./dist/cjs/index.js", + "types": "./dist/cjs/index.d.ts", + "module": "./dist/esm/index.js", + "description": "SDK for Solana, used in conjunction with @wormhole-foundation/sdk", + "files": [ + "dist/esm", + "dist/cjs" + ], + "keywords": [ + "wormhole", + "sdk", + "typescript", + "ntt", + "solana" + ], + "engines": { + "node": ">=16" + }, + "sideEffects": true, + "scripts": { + "build:cjs": "tsc -p ./tsconfig.cjs.json && echo '{\"type\":\"commonjs\"}' > dist/cjs/package.json", + "build:esm": "tsc -p ./tsconfig.esm.json", + "build": "npm run build:esm && npm run build:cjs", + "rebuild": "npm run clean && npm run build", + "clean": "rm -rf ./dist", + "test:ci": "jest --config ./jest.config.ts", + "build:contracts": "make build" + }, + "devDependencies": { + "@types/bn.js": "^5.1.5", + "nock": "^13.3.3", + "ts-jest": "^29.1.2", + "ts-node": "^10.9.2", + "tsx": "^4.7.2" + }, + "dependencies": { + "@coral-xyz/anchor": "0.29.0", + "@coral-xyz/borsh": "0.29.0", + "@solana/spl-token": "0.4.0", + "@solana/web3.js": "1.91.7", + "bn.js": "5.2.1", + "@wormhole-foundation/sdk-connect": "0.6.5", + "@wormhole-foundation/sdk-solana": "0.6.5", + "@wormhole-foundation/sdk-solana-core": "0.6.5" + }, + "type": "module", + "exports": { + ".": { + "import": { + "types": "./dist/esm/ts/index.d.ts", + "default": "./dist/esm/ts/index.js" + }, + "require": { + "types": "./dist/cjs/ts/index.d.ts", + "default": "./dist/cjs/ts/index.js" + } } -} + } +} \ No newline at end of file diff --git a/solana/scripts/regenerateIdl.ts b/solana/scripts/regenerateIdl.ts new file mode 100644 index 000000000..175c2eb21 --- /dev/null +++ b/solana/scripts/regenerateIdl.ts @@ -0,0 +1,35 @@ +import { type Idl } from "@coral-xyz/anchor"; +import fs from "fs"; + +const jsonPath = process.argv[2]; +if (jsonPath === undefined) { + console.error(`Usage:\ +${process.argv[0]} ${process.argv[1]} `); + process.exit(1); +} + +// snake to title case +const titleCase = (str: string) => + str + .split("_") + .map((word) => word[0].toUpperCase() + word.slice(1).toLowerCase()) + .join(""); + +const idl: Idl = JSON.parse(fs.readFileSync(jsonPath, "utf8")); + +const name = titleCase(idl["name"]); + +idl.accounts?.forEach((account) => { + account.name = account.name.replace(/^[A-Z]+/, (match) => + match.toLowerCase() + ); +}); + +// heredoc +const ts = `\ +export type ${name} = ${JSON.stringify(idl, null, 2)}\ + +export const IDL: ${name} = ${JSON.stringify(idl, null, 2)} +`; + +console.log(ts); diff --git a/solana/tests/anchor.test.ts b/solana/tests/anchor.test.ts new file mode 100644 index 000000000..eab8663c7 --- /dev/null +++ b/solana/tests/anchor.test.ts @@ -0,0 +1,419 @@ +import * as anchor from "@coral-xyz/anchor"; +import * as spl from "@solana/spl-token"; +import { + ChainAddress, + ChainContext, + Signer, + UniversalAddress, + Wormhole, + contracts, + deserialize, + deserializePayload, + encoding, + serialize, + serializePayload, + signSendWait as ssw, +} from "@wormhole-foundation/sdk-connect"; +import * as testing from "@wormhole-foundation/sdk-definitions/testing"; +import { + SolanaAddress, + SolanaPlatform, + getSolanaSignAndSendSigner, +} from "@wormhole-foundation/sdk-solana"; +import { SolanaWormholeCore } from "@wormhole-foundation/sdk-solana-core"; +import * as fs from "fs"; + +import { PublicKey, SystemProgram, Transaction } from "@solana/web3.js"; +import { AccountAddress } from "@wormhole-foundation/sdk"; +import { DummyTransferHook } from "../ts/idl/1_0_0/ts/dummy_transfer_hook.js"; +import { SolanaNtt } from "../ts/sdk/index.js"; + +const solanaRootDir = `${__dirname}/../`; + +const GUARDIAN_KEY = + "cfb12303a19cde580bb4dd771639b0d26bc68353645571a8cff516ab2ee113a0"; +const CORE_BRIDGE_ADDRESS = contracts.coreBridge("Mainnet", "Solana"); +const NTT_ADDRESS = anchor.workspace.ExampleNativeTokenTransfers.programId; + +async function signSendWait( + chain: ChainContext, + txs: AsyncGenerator, + signer: Signer +) { + try { + await ssw(chain, txs, signer); + } catch (e) { + console.error(e); + } +} + +const w = new Wormhole("Devnet", [SolanaPlatform], { + chains: { + Solana: { + contracts: { + coreBridge: CORE_BRIDGE_ADDRESS, + }, + }, + }, +}); + +const remoteXcvr: ChainAddress = { + chain: "Ethereum", + address: new UniversalAddress( + encoding.bytes.encode("transceiver".padStart(32, "\0")) + ), +}; +const remoteMgr: ChainAddress = { + chain: "Ethereum", + address: new UniversalAddress( + encoding.bytes.encode("nttManager".padStart(32, "\0")) + ), +}; + +const payerSecretKey = Uint8Array.from( + JSON.parse( + fs.readFileSync(`${solanaRootDir}/keys/test.json`, { + encoding: "utf-8", + }) + ) +); +const payer = anchor.web3.Keypair.fromSecretKey(payerSecretKey); + +const owner = anchor.web3.Keypair.generate(); +const connection = new anchor.web3.Connection( + "http://localhost:8899", + "confirmed" +); + +// Make sure we're using the exact same Connection obj for rpc +const ctx: ChainContext<"Devnet", "Solana"> = w + .getPlatform("Solana") + .getChain("Solana", connection); + +let tokenAccount: anchor.web3.PublicKey; + +const mint = anchor.web3.Keypair.generate(); + +const dummyTransferHook = anchor.workspace + .DummyTransferHook as anchor.Program; + +const [extraAccountMetaListPDA] = PublicKey.findProgramAddressSync( + [Buffer.from("extra-account-metas"), mint.publicKey.toBuffer()], + dummyTransferHook.programId +); + +const [counterPDA] = PublicKey.findProgramAddressSync( + [Buffer.from("counter")], + dummyTransferHook.programId +); + +async function counterValue(): Promise { + const counter = await dummyTransferHook.account.counter.fetch(counterPDA); + return counter.count; +} + +const coreBridge = new SolanaWormholeCore("Devnet", "Solana", connection, { + coreBridge: CORE_BRIDGE_ADDRESS, +}); + +const TOKEN_PROGRAM = spl.TOKEN_2022_PROGRAM_ID; + +describe("example-native-token-transfers", () => { + let ntt: SolanaNtt<"Devnet", "Solana">; + let signer: Signer; + let sender: AccountAddress<"Solana">; + let tokenAddress: string; + + beforeAll(async () => { + try { + signer = await getSolanaSignAndSendSigner(connection, payer, { + //debug: true, + }); + sender = Wormhole.parseAddress("Solana", signer.address()); + + const extensions = [spl.ExtensionType.TransferHook]; + const mintLen = spl.getMintLen(extensions); + const lamports = await connection.getMinimumBalanceForRentExemption( + mintLen + ); + + const transaction = new Transaction().add( + SystemProgram.createAccount({ + fromPubkey: payer.publicKey, + newAccountPubkey: mint.publicKey, + space: mintLen, + lamports, + programId: TOKEN_PROGRAM, + }), + spl.createInitializeTransferHookInstruction( + mint.publicKey, + owner.publicKey, + dummyTransferHook.programId, + TOKEN_PROGRAM + ), + spl.createInitializeMintInstruction( + mint.publicKey, + 9, + owner.publicKey, + null, + TOKEN_PROGRAM + ) + ); + + const { blockhash } = await connection.getRecentBlockhash(); + + transaction.feePayer = payer.publicKey; + transaction.recentBlockhash = blockhash; + + const txid = await connection.sendTransaction(transaction, [payer, mint]); + await connection.confirmTransaction(txid, "confirmed"); + + tokenAccount = await spl.createAssociatedTokenAccount( + connection, + payer, + mint.publicKey, + payer.publicKey, + undefined, + TOKEN_PROGRAM, + spl.ASSOCIATED_TOKEN_PROGRAM_ID + ); + + await spl.mintTo( + connection, + payer, + mint.publicKey, + tokenAccount, + owner, + 10_000_000n, + undefined, + undefined, + TOKEN_PROGRAM + ); + + tokenAddress = mint.publicKey.toBase58(); + // Create our contract client + ntt = new SolanaNtt("Devnet", "Solana", connection, { + ...ctx.config.contracts, + ntt: { + token: tokenAddress, + manager: NTT_ADDRESS, + transceiver: { wormhole: NTT_ADDRESS }, + }, + }); + } catch (e) { + console.error("Failed to setup solana token: ", e); + throw e; + } + }); + + describe("Locking", () => { + beforeAll(async () => { + try { + await spl.setAuthority( + connection, + payer, + mint.publicKey, + owner, + spl.AuthorityType.MintTokens, + ntt.pdas.tokenAuthority(), + [], + undefined, + TOKEN_PROGRAM + ); + + // init + const initTxs = ntt.initialize(sender, { + mint: mint.publicKey, + outboundLimit: 1000000n, + mode: "burning", + }); + await signSendWait(ctx, initTxs, signer); + + // register + const registerTxs = ntt.registerTransceiver({ + payer, + owner: payer, + transceiver: ntt.program.programId, + }); + await signSendWait(ctx, registerTxs, signer); + + // Set Wormhole xcvr peer + const setXcvrPeerTxs = ntt.setWormholeTransceiverPeer( + remoteXcvr, + sender + ); + await signSendWait(ctx, setXcvrPeerTxs, signer); + + // Set manager peer + const setPeerTxs = ntt.setPeer(remoteMgr, 18, 1000000n, sender); + await signSendWait(ctx, setPeerTxs, signer); + } catch (e) { + console.error("Failed to setup peer: ", e); + throw e; + } + }); + + it("Create ExtraAccountMetaList Account", async () => { + const initializeExtraAccountMetaListInstruction = + await dummyTransferHook.methods + .initializeExtraAccountMetaList() + .accountsStrict({ + payer: payer.publicKey, + mint: mint.publicKey, + counter: counterPDA, + extraAccountMetaList: extraAccountMetaListPDA, + tokenProgram: TOKEN_PROGRAM, + associatedTokenProgram: spl.ASSOCIATED_TOKEN_PROGRAM_ID, + systemProgram: SystemProgram.programId, + }) + .instruction(); + + const transaction = new Transaction().add( + initializeExtraAccountMetaListInstruction + ); + transaction.feePayer = payer.publicKey; + const { blockhash } = await connection.getRecentBlockhash(); + transaction.recentBlockhash = blockhash; + + transaction.sign(payer); + const txid = await connection.sendTransaction(transaction, [payer]); + await connection.confirmTransaction(txid, "confirmed"); + }); + + test("Can send tokens", async () => { + const amount = 100000n; + const sender = Wormhole.parseAddress("Solana", signer.address()); + + const receiver = testing.utils.makeUniversalChainAddress("Ethereum"); + + // TODO: keep or remove the `outboxItem` param? + // added as a way to keep tests the same but it technically breaks the Ntt interface + const outboxItem = anchor.web3.Keypair.generate(); + const xferTxs = ntt.transfer( + sender, + amount, + receiver, + { queue: false, automatic: false, gasDropoff: 0n }, + outboxItem + ); + await signSendWait(ctx, xferTxs, signer); + + const wormholeMessage = ntt.pdas.wormholeMessageAccount( + outboxItem.publicKey + ); + + const unsignedVaa = await coreBridge.parsePostMessageAccount( + wormholeMessage + ); + + const transceiverMessage = deserializePayload( + "Ntt:WormholeTransfer", + unsignedVaa.payload + ); + + // assert that amount is what we expect + expect( + transceiverMessage.nttManagerPayload.payload.trimmedAmount + ).toMatchObject({ amount: 10000n, decimals: 8 }); + + // get from balance + const balance = await connection.getTokenAccountBalance(tokenAccount); + expect(balance.value.amount).toBe("9900000"); + }); + + it("Can receive tokens", async () => { + const emitter = new testing.mocks.MockEmitter( + remoteXcvr.address as UniversalAddress, + "Ethereum", + 0n + ); + + const guardians = new testing.mocks.MockGuardians(0, [GUARDIAN_KEY]); + const sender = Wormhole.parseAddress("Solana", signer.address()); + + const sendingTransceiverMessage = { + sourceNttManager: remoteMgr.address as UniversalAddress, + recipientNttManager: new UniversalAddress( + ntt.program.programId.toBytes() + ), + nttManagerPayload: { + id: encoding.bytes.encode("sequence1".padEnd(32, "0")), + sender: new UniversalAddress("FACE".padStart(64, "0")), + payload: { + trimmedAmount: { + amount: 10000n, + decimals: 8, + }, + sourceToken: new UniversalAddress("FAFA".padStart(64, "0")), + recipientAddress: new UniversalAddress(payer.publicKey.toBytes()), + recipientChain: "Solana", + }, + }, + transceiverPayload: new Uint8Array(), + } as const; + + const serialized = serializePayload( + "Ntt:WormholeTransfer", + sendingTransceiverMessage + ); + const published = emitter.publishMessage(0, serialized, 200); + const rawVaa = guardians.addSignatures(published, [0]); + const vaa = deserialize("Ntt:WormholeTransfer", serialize(rawVaa)); + + const redeemTxs = ntt.redeem([vaa], sender); + try { + await signSendWait(ctx, redeemTxs, signer); + } catch (e) { + console.error(e); + throw e; + } + + // expect(released).toEqual(true); + expect((await counterValue()).toString()).toEqual("2"); + }); + }); + + describe("Static Checks", () => { + const wh = new Wormhole("Devnet", [SolanaPlatform]); + const ctx = wh.getChain("Solana"); + const overrides = { + Solana: { + token: tokenAddress, + manager: NTT_ADDRESS, + transceiver: { wormhole: NTT_ADDRESS }, + }, + }; + + describe("ABI Versions Test", function () { + test("It initializes from Rpc", async function () { + const ntt = await SolanaNtt.fromRpc(connection, { + Solana: { + ...ctx.config, + contracts: { + ...ctx.config.contracts, + ntt: overrides["Solana"], + }, + }, + }); + expect(ntt).toBeTruthy(); + }); + + test("It initializes from constructor", async function () { + const ntt = new SolanaNtt("Devnet", "Solana", connection, { + ...ctx.config.contracts, + ...{ ntt: overrides["Solana"] }, + }); + expect(ntt).toBeTruthy(); + }); + + test("It gets the correct version", async function () { + const version = await SolanaNtt.getVersion( + connection, + { ntt: overrides["Solana"] }, + new SolanaAddress(payer.publicKey.toBase58()) + ); + expect(version).toBe("2.0.0"); + }); + }); + }); +}); diff --git a/solana/tests/example-native-token-transfer.ts b/solana/tests/example-native-token-transfer.ts deleted file mode 100644 index 4431a5af3..000000000 --- a/solana/tests/example-native-token-transfer.ts +++ /dev/null @@ -1,315 +0,0 @@ -import * as anchor from "@coral-xyz/anchor"; -import { BN } from "@coral-xyz/anchor"; -import * as spl from "@solana/spl-token"; -import { PostedMessageData } from "@certusone/wormhole-sdk/lib/cjs/solana/wormhole"; -import { expect } from "chai"; -import { toChainId } from "@certusone/wormhole-sdk"; -import { - MockEmitter, - MockGuardians, -} from "@certusone/wormhole-sdk/lib/cjs/mock"; -import * as fs from "fs"; - -import { encoding } from "@wormhole-foundation/sdk-base"; -import { - UniversalAddress, - serializePayload, - deserializePayload, -} from "@wormhole-foundation/sdk-definitions"; -import { postVaa, NTT, nttMessageLayout } from "../ts/sdk"; -import { WormholeTransceiverMessage } from "../ts/sdk/nttLayout"; - -import { - PublicKey, - SystemProgram, - Transaction, - sendAndConfirmTransaction, -} from "@solana/web3.js"; - -import { DummyTransferHook } from "../target/types/dummy_transfer_hook"; - -export const GUARDIAN_KEY = - "cfb12303a19cde580bb4dd771639b0d26bc68353645571a8cff516ab2ee113a0"; - -describe("example-native-token-transfers", () => { - const payerSecretKey = Uint8Array.from( - JSON.parse( - fs.readFileSync(`${__dirname}/../keys/test.json`, { encoding: "utf-8" }) - ) - ); - const payer = anchor.web3.Keypair.fromSecretKey(payerSecretKey); - - const owner = anchor.web3.Keypair.generate(); - const connection = new anchor.web3.Connection( - "http://localhost:8899", - "confirmed" - ); - const ntt = new NTT(connection, { - nttId: "nttiK1SepaQt6sZ4WGW5whvc9tEnGXGxuKeptcQPCcS", - wormholeId: "worm2ZoG2kUd4vFXhvjh93UUH596ayRfgQ2MgjNMTth", - }); - const user = anchor.web3.Keypair.generate(); - let tokenAccount: anchor.web3.PublicKey; - - const mint = anchor.web3.Keypair.generate(); - - const dummyTransferHook = anchor.workspace - .DummyTransferHook as anchor.Program; - - const [extraAccountMetaListPDA] = PublicKey.findProgramAddressSync( - [Buffer.from("extra-account-metas"), mint.publicKey.toBuffer()], - dummyTransferHook.programId - ); - - const [counterPDA] = PublicKey.findProgramAddressSync( - [Buffer.from("counter")], - dummyTransferHook.programId - ); - - async function counterValue(): Promise { - const counter = await dummyTransferHook.account.counter.fetch(counterPDA); - return counter.count - } - - it("Initialize mint", async () => { - const extensions = [spl.ExtensionType.TransferHook]; - const mintLen = spl.getMintLen(extensions); - const lamports = await connection.getMinimumBalanceForRentExemption( - mintLen - ); - - const transaction = new Transaction().add( - SystemProgram.createAccount({ - fromPubkey: payer.publicKey, - newAccountPubkey: mint.publicKey, - space: mintLen, - lamports, - programId: spl.TOKEN_2022_PROGRAM_ID, - }), - spl.createInitializeTransferHookInstruction( - mint.publicKey, - owner.publicKey, - dummyTransferHook.programId, - spl.TOKEN_2022_PROGRAM_ID - ), - spl.createInitializeMintInstruction( - mint.publicKey, - 9, - owner.publicKey, - null, - spl.TOKEN_2022_PROGRAM_ID - ) - ); - - await sendAndConfirmTransaction(connection, transaction, [payer, mint]); - - tokenAccount = await spl.createAssociatedTokenAccount( - connection, - payer, - mint.publicKey, - user.publicKey, - undefined, - spl.TOKEN_2022_PROGRAM_ID, - spl.ASSOCIATED_TOKEN_PROGRAM_ID - ); - - await spl.mintTo( - connection, - payer, - mint.publicKey, - tokenAccount, - owner, - BigInt(10000000), - undefined, - undefined, - spl.TOKEN_2022_PROGRAM_ID - ); - }); - - it("Can check version", async () => { - const version = await ntt.version(payer.publicKey); - expect(version).to.equal("1.0.0"); - }); - - it("Create ExtraAccountMetaList Account", async () => { - const initializeExtraAccountMetaListInstruction = - await dummyTransferHook.methods - .initializeExtraAccountMetaList() - .accountsStrict({ - payer: payer.publicKey, - mint: mint.publicKey, - counter: counterPDA, - extraAccountMetaList: extraAccountMetaListPDA, - tokenProgram: spl.TOKEN_2022_PROGRAM_ID, - associatedTokenProgram: spl.ASSOCIATED_TOKEN_PROGRAM_ID, - systemProgram: SystemProgram.programId, - }) - .instruction(); - - const transaction = new Transaction().add( - initializeExtraAccountMetaListInstruction - ); - - await sendAndConfirmTransaction(connection, transaction, [payer]); - }); - - describe("Burning", () => { - before(async () => { - await spl.setAuthority( - connection, - payer, - mint.publicKey, - owner, - spl.AuthorityType.MintTokens, - ntt.tokenAuthorityAddress(), - [], - undefined, - spl.TOKEN_2022_PROGRAM_ID - ); - - await ntt.initialize({ - payer, - owner: payer, - chain: "solana", - mint: mint.publicKey, - outboundLimit: new BN(1000000), - mode: "burning", - }); - - // NOTE: this is a hack. The next instruction will fail if we don't wait - // here, because the address lookup table is not yet available, despite - // the transaction having been confirmed. - // Looks like a bug, but I haven't investigated further. In practice, this - // won't be an issue, becase the address lookup table will have been - // created well before anyone is trying to use it, but we might want to be - // mindful in the deploy script too. - await new Promise((resolve) => setTimeout(resolve, 200)); - - await ntt.registerTransceiver({ - payer, - owner: payer, - transceiver: ntt.program.programId, - }); - - await ntt.setWormholeTransceiverPeer({ - payer, - owner: payer, - chain: "ethereum", - address: Buffer.from("transceiver".padStart(32, "\0")), - }); - - await ntt.setPeer({ - payer, - owner: payer, - chain: "ethereum", - address: Buffer.from("nttManager".padStart(32, "\0")), - limit: new BN(1000000), - tokenDecimals: 18, - }); - }); - - it("Can send tokens", async () => { - // TODO: factor out this test so it can be reused for burn&mint - - // transfer some tokens - - const amount = new BN(100000); - - const outboxItem = await ntt.transfer({ - payer, - from: tokenAccount, - fromAuthority: user, - amount, - recipientChain: "ethereum", - recipientAddress: Array.from(user.publicKey.toBuffer()), // TODO: dummy - shouldQueue: false, - }); - - const wormholeMessage = ntt.wormholeMessageAccountAddress(outboxItem); - - const wormholeMessageAccount = await connection.getAccountInfo( - wormholeMessage - ); - if (wormholeMessageAccount === null) { - throw new Error("wormhole message account not found"); - } - - const messageData = PostedMessageData.deserialize( - wormholeMessageAccount.data - ); - const transceiverMessage = deserializePayload( - "Ntt:WormholeTransfer", - messageData.message.payload - ); - - // assert theat amount is what we expect - expect( - transceiverMessage.nttManagerPayload.payload.trimmedAmount - ).to.deep.equal({ amount: 10000n, decimals: 8 }); - // get from balance - const balance = await connection.getTokenAccountBalance(tokenAccount); - expect(balance.value.amount).to.equal("9900000"); - - expect((await counterValue()).toString()).to.be.eq("1") - }); - - it("Can receive tokens", async () => { - const emitter = new MockEmitter( - Buffer.from("transceiver".padStart(32, "\0")).toString("hex"), - toChainId("ethereum"), - Number(0) // sequence - ); - - const guardians = new MockGuardians(0, [GUARDIAN_KEY]); - - const sendingTransceiverMessage: WormholeTransceiverMessage< - typeof nttMessageLayout - > = { - sourceNttManager: new UniversalAddress( - encoding.bytes.encode("nttManager".padStart(32, "\0")) - ), - recipientNttManager: new UniversalAddress( - ntt.program.programId.toBytes() - ), - nttManagerPayload: { - id: encoding.bytes.encode("sequence1".padEnd(32, "0")), - sender: new UniversalAddress("FACE".padStart(64, "0")), - payload: { - trimmedAmount: { - amount: 10000n, - decimals: 8, - }, - sourceToken: new UniversalAddress("FAFA".padStart(64, "0")), - recipientAddress: new UniversalAddress(user.publicKey.toBytes()), - recipientChain: "Solana", - }, - }, - transceiverPayload: { forSpecializedRelayer: false }, - } as const; - - const serialized = serializePayload( - "Ntt:WormholeTransfer", - sendingTransceiverMessage - ); - - const published = emitter.publishMessage( - 0, // nonce - Buffer.from(serialized), - 0 // consistency level - ); - - const vaaBuf = guardians.addSignatures(published, [0]); - - await postVaa(connection, payer, vaaBuf, ntt.wormholeId); - - const released = await ntt.redeem({ - payer, - vaa: vaaBuf, - }); - - expect(released).to.equal(true); - - expect((await counterValue()).toString()).to.be.eq("2") - }); - }); -}); diff --git a/sdk/solana/src/anchor-idl/2_0_0/dummy_transfer_hook.json b/solana/ts/idl/1_0_0/json/dummy_transfer_hook.json similarity index 100% rename from sdk/solana/src/anchor-idl/2_0_0/dummy_transfer_hook.json rename to solana/ts/idl/1_0_0/json/dummy_transfer_hook.json diff --git a/sdk/solana/src/anchor-idl/1_0_0/example_native_token_transfers.json b/solana/ts/idl/1_0_0/json/example_native_token_transfers.json similarity index 100% rename from sdk/solana/src/anchor-idl/1_0_0/example_native_token_transfers.json rename to solana/ts/idl/1_0_0/json/example_native_token_transfers.json diff --git a/sdk/solana/src/anchor-idl/2_0_0/ntt_quoter.json b/solana/ts/idl/1_0_0/json/ntt_quoter.json similarity index 100% rename from sdk/solana/src/anchor-idl/2_0_0/ntt_quoter.json rename to solana/ts/idl/1_0_0/json/ntt_quoter.json diff --git a/sdk/solana/src/anchor-idl/1_0_0/wormhole_governance.json b/solana/ts/idl/1_0_0/json/wormhole_governance.json similarity index 100% rename from sdk/solana/src/anchor-idl/1_0_0/wormhole_governance.json rename to solana/ts/idl/1_0_0/json/wormhole_governance.json diff --git a/solana/idl/ts/dummy_transfer_hook.ts b/solana/ts/idl/1_0_0/ts/dummy_transfer_hook.ts similarity index 99% rename from solana/idl/ts/dummy_transfer_hook.ts rename to solana/ts/idl/1_0_0/ts/dummy_transfer_hook.ts index 25e31bff3..3d6d66a9b 100644 --- a/solana/idl/ts/dummy_transfer_hook.ts +++ b/solana/ts/idl/1_0_0/ts/dummy_transfer_hook.ts @@ -107,8 +107,7 @@ export type DummyTransferHook = { } } ] -}; - +} export const IDL: DummyTransferHook = { "version": "2.0.0", "name": "dummy_transfer_hook", @@ -218,4 +217,5 @@ export const IDL: DummyTransferHook = { } } ] -}; +} + diff --git a/solana/ts/idl/1_0_0/ts/example_native_token_transfers.ts b/solana/ts/idl/1_0_0/ts/example_native_token_transfers.ts new file mode 100644 index 000000000..811709bb8 --- /dev/null +++ b/solana/ts/idl/1_0_0/ts/example_native_token_transfers.ts @@ -0,0 +1,3454 @@ +export type ExampleNativeTokenTransfers = { + version: "1.0.0"; + name: "example_native_token_transfers"; + instructions: [ + { + name: "initialize"; + accounts: [ + { + name: "payer"; + isMut: true; + isSigner: true; + }, + { + name: "deployer"; + isMut: false; + isSigner: true; + }, + { + name: "programData"; + isMut: false; + isSigner: false; + }, + { + name: "config"; + isMut: true; + isSigner: false; + }, + { + name: "mint"; + isMut: false; + isSigner: false; + }, + { + name: "rateLimit"; + isMut: true; + isSigner: false; + }, + { + name: "tokenAuthority"; + isMut: false; + isSigner: false; + }, + { + name: "custody"; + isMut: true; + isSigner: false; + docs: [ + "The custody account that holds tokens in locking mode.", + "NOTE: the account is unconditionally initialized, but not used in", + "burning mode.", + "function if the token account has already been created." + ]; + }, + { + name: "tokenProgram"; + isMut: false; + isSigner: false; + docs: ["associated token account for the given mint."]; + }, + { + name: "associatedTokenProgram"; + isMut: false; + isSigner: false; + }, + { + name: "bpfLoaderUpgradeableProgram"; + isMut: false; + isSigner: false; + }, + { + name: "systemProgram"; + isMut: false; + isSigner: false; + } + ]; + args: [ + { + name: "args"; + type: { + defined: "InitializeArgs"; + }; + } + ]; + }, + { + name: "version"; + accounts: []; + args: []; + returns: "string"; + }, + { + name: "transferBurn"; + accounts: [ + { + name: "common"; + accounts: [ + { + name: "payer"; + isMut: true; + isSigner: true; + }, + { + name: "config"; + accounts: [ + { + name: "config"; + isMut: false; + isSigner: false; + } + ]; + }, + { + name: "mint"; + isMut: true; + isSigner: false; + }, + { + name: "from"; + isMut: true; + isSigner: false; + docs: ["account can spend these tokens."]; + }, + { + name: "tokenProgram"; + isMut: false; + isSigner: false; + }, + { + name: "outboxItem"; + isMut: true; + isSigner: true; + }, + { + name: "outboxRateLimit"; + isMut: true; + isSigner: false; + }, + { + name: "systemProgram"; + isMut: false; + isSigner: false; + } + ]; + }, + { + name: "inboxRateLimit"; + isMut: true; + isSigner: false; + }, + { + name: "peer"; + isMut: false; + isSigner: false; + }, + { + name: "sessionAuthority"; + isMut: false; + isSigner: false; + } + ]; + args: [ + { + name: "args"; + type: { + defined: "TransferArgs"; + }; + } + ]; + }, + { + name: "transferLock"; + accounts: [ + { + name: "common"; + accounts: [ + { + name: "payer"; + isMut: true; + isSigner: true; + }, + { + name: "config"; + accounts: [ + { + name: "config"; + isMut: false; + isSigner: false; + } + ]; + }, + { + name: "mint"; + isMut: true; + isSigner: false; + }, + { + name: "from"; + isMut: true; + isSigner: false; + docs: ["account can spend these tokens."]; + }, + { + name: "tokenProgram"; + isMut: false; + isSigner: false; + }, + { + name: "outboxItem"; + isMut: true; + isSigner: true; + }, + { + name: "outboxRateLimit"; + isMut: true; + isSigner: false; + }, + { + name: "systemProgram"; + isMut: false; + isSigner: false; + } + ]; + }, + { + name: "inboxRateLimit"; + isMut: true; + isSigner: false; + }, + { + name: "peer"; + isMut: false; + isSigner: false; + }, + { + name: "sessionAuthority"; + isMut: false; + isSigner: false; + }, + { + name: "custody"; + isMut: true; + isSigner: false; + } + ]; + args: [ + { + name: "args"; + type: { + defined: "TransferArgs"; + }; + } + ]; + }, + { + name: "redeem"; + accounts: [ + { + name: "payer"; + isMut: true; + isSigner: true; + }, + { + name: "config"; + isMut: false; + isSigner: false; + }, + { + name: "peer"; + isMut: false; + isSigner: false; + }, + { + name: "transceiverMessage"; + isMut: false; + isSigner: false; + }, + { + name: "transceiver"; + isMut: false; + isSigner: false; + }, + { + name: "mint"; + isMut: false; + isSigner: false; + }, + { + name: "inboxItem"; + isMut: true; + isSigner: false; + docs: [ + "NOTE: This account is content-addressed (PDA seeded by the message hash).", + "This is because in a multi-transceiver configuration, the different", + 'transceivers "vote" on messages (by delivering them). By making the inbox', + "items content-addressed, we can ensure that disagreeing votes don't", + "interfere with each other.", + "On the first call to [`redeem()`], [`InboxItem`] will be allocated and initialized with", + "default values.", + 'On subsequent calls, we want to modify the `InboxItem` by "voting" on it. Therefore the', + "program should not fail which would occur when using the `init` constraint.", + "The [`InboxItem::init`] field is used to guard against malicious or accidental modification", + "InboxItem fields that should remain constant." + ]; + }, + { + name: "inboxRateLimit"; + isMut: true; + isSigner: false; + }, + { + name: "outboxRateLimit"; + isMut: true; + isSigner: false; + }, + { + name: "systemProgram"; + isMut: false; + isSigner: false; + } + ]; + args: [ + { + name: "args"; + type: { + defined: "RedeemArgs"; + }; + } + ]; + }, + { + name: "releaseInboundMint"; + accounts: [ + { + name: "common"; + accounts: [ + { + name: "payer"; + isMut: true; + isSigner: true; + }, + { + name: "config"; + accounts: [ + { + name: "config"; + isMut: false; + isSigner: false; + } + ]; + }, + { + name: "inboxItem"; + isMut: true; + isSigner: false; + }, + { + name: "recipient"; + isMut: true; + isSigner: false; + }, + { + name: "tokenAuthority"; + isMut: false; + isSigner: false; + }, + { + name: "mint"; + isMut: true; + isSigner: false; + }, + { + name: "tokenProgram"; + isMut: false; + isSigner: false; + } + ]; + } + ]; + args: [ + { + name: "args"; + type: { + defined: "ReleaseInboundArgs"; + }; + } + ]; + }, + { + name: "releaseInboundUnlock"; + accounts: [ + { + name: "common"; + accounts: [ + { + name: "payer"; + isMut: true; + isSigner: true; + }, + { + name: "config"; + accounts: [ + { + name: "config"; + isMut: false; + isSigner: false; + } + ]; + }, + { + name: "inboxItem"; + isMut: true; + isSigner: false; + }, + { + name: "recipient"; + isMut: true; + isSigner: false; + }, + { + name: "tokenAuthority"; + isMut: false; + isSigner: false; + }, + { + name: "mint"; + isMut: true; + isSigner: false; + }, + { + name: "tokenProgram"; + isMut: false; + isSigner: false; + } + ]; + }, + { + name: "custody"; + isMut: true; + isSigner: false; + } + ]; + args: [ + { + name: "args"; + type: { + defined: "ReleaseInboundArgs"; + }; + } + ]; + }, + { + name: "transferOwnership"; + accounts: [ + { + name: "config"; + isMut: true; + isSigner: false; + }, + { + name: "owner"; + isMut: false; + isSigner: true; + }, + { + name: "newOwner"; + isMut: false; + isSigner: false; + }, + { + name: "upgradeLock"; + isMut: false; + isSigner: false; + }, + { + name: "programData"; + isMut: true; + isSigner: false; + }, + { + name: "bpfLoaderUpgradeableProgram"; + isMut: false; + isSigner: false; + } + ]; + args: []; + }, + { + name: "claimOwnership"; + accounts: [ + { + name: "config"; + isMut: true; + isSigner: false; + }, + { + name: "upgradeLock"; + isMut: false; + isSigner: false; + }, + { + name: "newOwner"; + isMut: false; + isSigner: true; + }, + { + name: "programData"; + isMut: true; + isSigner: false; + }, + { + name: "bpfLoaderUpgradeableProgram"; + isMut: false; + isSigner: false; + } + ]; + args: []; + }, + { + name: "setPaused"; + accounts: [ + { + name: "owner"; + isMut: false; + isSigner: true; + }, + { + name: "config"; + isMut: true; + isSigner: false; + } + ]; + args: [ + { + name: "pause"; + type: "bool"; + } + ]; + }, + { + name: "setPeer"; + accounts: [ + { + name: "payer"; + isMut: true; + isSigner: true; + }, + { + name: "owner"; + isMut: false; + isSigner: true; + }, + { + name: "config"; + isMut: false; + isSigner: false; + }, + { + name: "peer"; + isMut: true; + isSigner: false; + }, + { + name: "inboxRateLimit"; + isMut: true; + isSigner: false; + }, + { + name: "systemProgram"; + isMut: false; + isSigner: false; + } + ]; + args: [ + { + name: "args"; + type: { + defined: "SetPeerArgs"; + }; + } + ]; + }, + { + name: "registerTransceiver"; + accounts: [ + { + name: "config"; + isMut: true; + isSigner: false; + }, + { + name: "owner"; + isMut: false; + isSigner: true; + }, + { + name: "payer"; + isMut: true; + isSigner: true; + }, + { + name: "transceiver"; + isMut: false; + isSigner: false; + }, + { + name: "registeredTransceiver"; + isMut: true; + isSigner: false; + }, + { + name: "systemProgram"; + isMut: false; + isSigner: false; + } + ]; + args: []; + }, + { + name: "setOutboundLimit"; + accounts: [ + { + name: "config"; + isMut: false; + isSigner: false; + }, + { + name: "owner"; + isMut: false; + isSigner: true; + }, + { + name: "rateLimit"; + isMut: true; + isSigner: false; + } + ]; + args: [ + { + name: "args"; + type: { + defined: "SetOutboundLimitArgs"; + }; + } + ]; + }, + { + name: "setInboundLimit"; + accounts: [ + { + name: "config"; + isMut: false; + isSigner: false; + }, + { + name: "owner"; + isMut: false; + isSigner: true; + }, + { + name: "rateLimit"; + isMut: true; + isSigner: false; + } + ]; + args: [ + { + name: "args"; + type: { + defined: "SetInboundLimitArgs"; + }; + } + ]; + }, + { + name: "setWormholePeer"; + accounts: [ + { + name: "config"; + isMut: false; + isSigner: false; + }, + { + name: "owner"; + isMut: false; + isSigner: true; + }, + { + name: "payer"; + isMut: true; + isSigner: true; + }, + { + name: "peer"; + isMut: true; + isSigner: false; + }, + { + name: "systemProgram"; + isMut: false; + isSigner: false; + } + ]; + args: [ + { + name: "args"; + type: { + defined: "SetTransceiverPeerArgs"; + }; + } + ]; + }, + { + name: "receiveWormholeMessage"; + accounts: [ + { + name: "payer"; + isMut: true; + isSigner: true; + }, + { + name: "config"; + accounts: [ + { + name: "config"; + isMut: false; + isSigner: false; + } + ]; + }, + { + name: "peer"; + isMut: false; + isSigner: false; + }, + { + name: "vaa"; + isMut: false; + isSigner: false; + }, + { + name: "transceiverMessage"; + isMut: true; + isSigner: false; + }, + { + name: "systemProgram"; + isMut: false; + isSigner: false; + } + ]; + args: []; + }, + { + name: "releaseWormholeOutbound"; + accounts: [ + { + name: "payer"; + isMut: true; + isSigner: true; + }, + { + name: "config"; + accounts: [ + { + name: "config"; + isMut: false; + isSigner: false; + } + ]; + }, + { + name: "outboxItem"; + isMut: true; + isSigner: false; + }, + { + name: "transceiver"; + isMut: false; + isSigner: false; + }, + { + name: "wormholeMessage"; + isMut: true; + isSigner: false; + }, + { + name: "emitter"; + isMut: false; + isSigner: false; + }, + { + name: "wormhole"; + accounts: [ + { + name: "bridge"; + isMut: true; + isSigner: false; + }, + { + name: "feeCollector"; + isMut: true; + isSigner: false; + }, + { + name: "sequence"; + isMut: true; + isSigner: false; + }, + { + name: "program"; + isMut: false; + isSigner: false; + }, + { + name: "systemProgram"; + isMut: false; + isSigner: false; + }, + { + name: "clock"; + isMut: false; + isSigner: false; + }, + { + name: "rent"; + isMut: false; + isSigner: false; + } + ]; + } + ]; + args: [ + { + name: "args"; + type: { + defined: "ReleaseOutboundArgs"; + }; + } + ]; + }, + { + name: "broadcastWormholeId"; + accounts: [ + { + name: "payer"; + isMut: true; + isSigner: true; + }, + { + name: "config"; + isMut: false; + isSigner: false; + }, + { + name: "mint"; + isMut: false; + isSigner: false; + }, + { + name: "wormholeMessage"; + isMut: true; + isSigner: true; + }, + { + name: "emitter"; + isMut: false; + isSigner: false; + }, + { + name: "wormhole"; + accounts: [ + { + name: "bridge"; + isMut: true; + isSigner: false; + }, + { + name: "feeCollector"; + isMut: true; + isSigner: false; + }, + { + name: "sequence"; + isMut: true; + isSigner: false; + }, + { + name: "program"; + isMut: false; + isSigner: false; + }, + { + name: "systemProgram"; + isMut: false; + isSigner: false; + }, + { + name: "clock"; + isMut: false; + isSigner: false; + }, + { + name: "rent"; + isMut: false; + isSigner: false; + } + ]; + } + ]; + args: []; + }, + { + name: "broadcastWormholePeer"; + accounts: [ + { + name: "payer"; + isMut: true; + isSigner: true; + }, + { + name: "config"; + isMut: false; + isSigner: false; + }, + { + name: "peer"; + isMut: false; + isSigner: false; + }, + { + name: "wormholeMessage"; + isMut: true; + isSigner: true; + }, + { + name: "emitter"; + isMut: false; + isSigner: false; + }, + { + name: "wormhole"; + accounts: [ + { + name: "bridge"; + isMut: true; + isSigner: false; + }, + { + name: "feeCollector"; + isMut: true; + isSigner: false; + }, + { + name: "sequence"; + isMut: true; + isSigner: false; + }, + { + name: "program"; + isMut: false; + isSigner: false; + }, + { + name: "systemProgram"; + isMut: false; + isSigner: false; + }, + { + name: "clock"; + isMut: false; + isSigner: false; + }, + { + name: "rent"; + isMut: false; + isSigner: false; + } + ]; + } + ]; + args: [ + { + name: "args"; + type: { + defined: "BroadcastPeerArgs"; + }; + } + ]; + } + ]; + accounts: [ + { + name: "config"; + type: { + kind: "struct"; + fields: [ + { + name: "bump"; + type: "u8"; + }, + { + name: "owner"; + docs: ["Owner of the program."]; + type: "publicKey"; + }, + { + name: "pendingOwner"; + docs: ["Pending next owner (before claiming ownership)."]; + type: { + option: "publicKey"; + }; + }, + { + name: "mint"; + docs: ["Mint address of the token managed by this program."]; + type: "publicKey"; + }, + { + name: "tokenProgram"; + docs: [ + "Address of the token program (token or token22). This could always be queried", + "from the [`mint`] account's owner, but storing it here avoids an indirection", + "on the client side." + ]; + type: "publicKey"; + }, + { + name: "mode"; + docs: [ + "The mode that this program is running in. This is used to determine", + "whether the program is burning tokens or locking tokens." + ]; + type: { + defined: "Mode"; + }; + }, + { + name: "chainId"; + docs: [ + "The chain id of the chain that this program is running on. We don't", + "hardcode this so that the program is deployable on any potential SVM", + "forks." + ]; + type: { + defined: "ChainId"; + }; + }, + { + name: "nextTransceiverId"; + docs: [ + "The next transceiver id to use when registering an transceiver." + ]; + type: "u8"; + }, + { + name: "threshold"; + docs: [ + "The number of transceivers that must attest to a transfer before it is", + "accepted." + ]; + type: "u8"; + }, + { + name: "enabledTransceivers"; + docs: [ + "Bitmap of enabled transceivers.", + "The maximum number of transceivers is equal to [`Bitmap::BITS`]." + ]; + type: { + defined: "Bitmap"; + }; + }, + { + name: "paused"; + docs: [ + "Pause the program. This is useful for upgrades and other maintenance." + ]; + type: "bool"; + }, + { + name: "custody"; + docs: ["The custody account that holds tokens in locking mode."]; + type: "publicKey"; + } + ]; + }; + }, + { + name: "nttManagerPeer"; + docs: [ + "A peer on another chain. Stored in a PDA seeded by the chain id." + ]; + type: { + kind: "struct"; + fields: [ + { + name: "bump"; + type: "u8"; + }, + { + name: "address"; + type: { + array: ["u8", 32]; + }; + }, + { + name: "tokenDecimals"; + type: "u8"; + } + ]; + }; + }, + { + name: "inboxItem"; + type: { + kind: "struct"; + fields: [ + { + name: "init"; + type: "bool"; + }, + { + name: "bump"; + type: "u8"; + }, + { + name: "amount"; + type: "u64"; + }, + { + name: "recipientAddress"; + type: "publicKey"; + }, + { + name: "votes"; + type: { + defined: "Bitmap"; + }; + }, + { + name: "releaseStatus"; + type: { + defined: "ReleaseStatus"; + }; + } + ]; + }; + }, + { + name: "inboxRateLimit"; + docs: [ + "Inbound rate limit per chain.", + "SECURITY: must check the PDA (since there are multiple PDAs, namely one for each chain.)" + ]; + type: { + kind: "struct"; + fields: [ + { + name: "bump"; + type: "u8"; + }, + { + name: "rateLimit"; + type: { + defined: "RateLimitState"; + }; + } + ]; + }; + }, + { + name: "outboxItem"; + type: { + kind: "struct"; + fields: [ + { + name: "amount"; + type: { + defined: "TrimmedAmount"; + }; + }, + { + name: "sender"; + type: "publicKey"; + }, + { + name: "recipientChain"; + type: { + defined: "ChainId"; + }; + }, + { + name: "recipientNttManager"; + type: { + array: ["u8", 32]; + }; + }, + { + name: "recipientAddress"; + type: { + array: ["u8", 32]; + }; + }, + { + name: "releaseTimestamp"; + type: "i64"; + }, + { + name: "released"; + type: { + defined: "Bitmap"; + }; + } + ]; + }; + }, + { + name: "outboxRateLimit"; + type: { + kind: "struct"; + fields: [ + { + name: "rateLimit"; + type: { + defined: "RateLimitState"; + }; + } + ]; + }; + }, + { + name: "registeredTransceiver"; + type: { + kind: "struct"; + fields: [ + { + name: "bump"; + type: "u8"; + }, + { + name: "id"; + type: "u8"; + }, + { + name: "transceiverAddress"; + type: "publicKey"; + } + ]; + }; + }, + { + name: "transceiverPeer"; + docs: [ + "A peer on another chain. Stored in a PDA seeded by the chain id." + ]; + type: { + kind: "struct"; + fields: [ + { + name: "bump"; + type: "u8"; + }, + { + name: "address"; + type: { + array: ["u8", 32]; + }; + } + ]; + }; + }, + { + name: "bridgeData"; + type: { + kind: "struct"; + fields: [ + { + name: "guardianSetIndex"; + docs: [ + "The current guardian set index, used to decide which signature sets to accept." + ]; + type: "u32"; + }, + { + name: "lastLamports"; + docs: ["Lamports in the collection account"]; + type: "u64"; + }, + { + name: "config"; + docs: [ + "Bridge configuration, which is set once upon initialization." + ]; + type: { + defined: "BridgeConfig"; + }; + } + ]; + }; + } + ]; + types: [ + { + name: "Bitmap"; + type: { + kind: "struct"; + fields: [ + { + name: "map"; + type: "u128"; + } + ]; + }; + }, + { + name: "SetInboundLimitArgs"; + type: { + kind: "struct"; + fields: [ + { + name: "limit"; + type: "u64"; + }, + { + name: "chainId"; + type: { + defined: "ChainId"; + }; + } + ]; + }; + }, + { + name: "SetOutboundLimitArgs"; + type: { + kind: "struct"; + fields: [ + { + name: "limit"; + type: "u64"; + } + ]; + }; + }, + { + name: "SetPeerArgs"; + type: { + kind: "struct"; + fields: [ + { + name: "chainId"; + type: { + defined: "ChainId"; + }; + }, + { + name: "address"; + type: { + array: ["u8", 32]; + }; + }, + { + name: "limit"; + type: "u64"; + }, + { + name: "tokenDecimals"; + docs: ["The token decimals on the peer chain."]; + type: "u8"; + } + ]; + }; + }, + { + name: "InitializeArgs"; + type: { + kind: "struct"; + fields: [ + { + name: "chainId"; + type: "u16"; + }, + { + name: "limit"; + type: "u64"; + }, + { + name: "mode"; + type: { + defined: "Mode"; + }; + } + ]; + }; + }, + { + name: "RedeemArgs"; + type: { + kind: "struct"; + fields: []; + }; + }, + { + name: "ReleaseInboundArgs"; + type: { + kind: "struct"; + fields: [ + { + name: "revertOnDelay"; + type: "bool"; + } + ]; + }; + }, + { + name: "TransferArgs"; + type: { + kind: "struct"; + fields: [ + { + name: "amount"; + type: "u64"; + }, + { + name: "recipientChain"; + type: { + defined: "ChainId"; + }; + }, + { + name: "recipientAddress"; + type: { + array: ["u8", 32]; + }; + }, + { + name: "shouldQueue"; + type: "bool"; + } + ]; + }; + }, + { + name: "ReleaseStatus"; + docs: [ + "The status of an InboxItem. This determines whether the tokens are minted/unlocked to the recipient. As", + "such, this must be used as a state machine that moves forward in a linear manner. A state", + 'should never "move backward" to a previous state (e.g. should never move from `Released` to', + "`ReleaseAfter`)." + ]; + type: { + kind: "enum"; + variants: [ + { + name: "NotApproved"; + }, + { + name: "ReleaseAfter"; + fields: ["i64"]; + }, + { + name: "Released"; + } + ]; + }; + }, + { + name: "RateLimitState"; + type: { + kind: "struct"; + fields: [ + { + name: "limit"; + docs: ["The maximum capacity of the rate limiter."]; + type: "u64"; + }, + { + name: "capacityAtLastTx"; + docs: [ + "The capacity of the rate limiter at `last_tx_timestamp`.", + "The actual current capacity is calculated in `capacity_at`, by", + "accounting for the time that has passed since `last_tx_timestamp` and", + "the refill rate." + ]; + type: "u64"; + }, + { + name: "lastTxTimestamp"; + docs: [ + "The timestamp of the last transaction that counted towards the current", + "capacity. Transactions that exceeded the capacity do not count, they are", + "just delayed." + ]; + type: "i64"; + } + ]; + }; + }, + { + name: "SetTransceiverPeerArgs"; + type: { + kind: "struct"; + fields: [ + { + name: "chainId"; + type: { + defined: "ChainId"; + }; + }, + { + name: "address"; + type: { + array: ["u8", 32]; + }; + } + ]; + }; + }, + { + name: "BroadcastPeerArgs"; + type: { + kind: "struct"; + fields: [ + { + name: "chainId"; + type: "u16"; + } + ]; + }; + }, + { + name: "ReleaseOutboundArgs"; + type: { + kind: "struct"; + fields: [ + { + name: "revertOnDelay"; + type: "bool"; + } + ]; + }; + }, + { + name: "ChainId"; + type: { + kind: "struct"; + fields: [ + { + name: "id"; + type: "u16"; + } + ]; + }; + }, + { + name: "Mode"; + type: { + kind: "enum"; + variants: [ + { + name: "Locking"; + }, + { + name: "Burning"; + } + ]; + }; + }, + { + name: "TrimmedAmount"; + type: { + kind: "struct"; + fields: [ + { + name: "amount"; + type: "u64"; + }, + { + name: "decimals"; + type: "u8"; + } + ]; + }; + }, + { + name: "BridgeConfig"; + type: { + kind: "struct"; + fields: [ + { + name: "guardianSetExpirationTime"; + docs: [ + "Period for how long a guardian set is valid after it has been replaced by a new one. This", + "guarantees that VAAs issued by that set can still be submitted for a certain period. In", + "this period we still trust the old guardian set." + ]; + type: "u32"; + }, + { + name: "fee"; + docs: [ + "Amount of lamports that needs to be paid to the protocol to post a message" + ]; + type: "u64"; + } + ]; + }; + } + ]; + errors: [ + { + code: 6000; + name: "CantReleaseYet"; + msg: "CantReleaseYet"; + }, + { + code: 6001; + name: "InvalidPendingOwner"; + msg: "InvalidPendingOwner"; + }, + { + code: 6002; + name: "InvalidChainId"; + msg: "InvalidChainId"; + }, + { + code: 6003; + name: "InvalidRecipientAddress"; + msg: "InvalidRecipientAddress"; + }, + { + code: 6004; + name: "InvalidTransceiverPeer"; + msg: "InvalidTransceiverPeer"; + }, + { + code: 6005; + name: "InvalidNttManagerPeer"; + msg: "InvalidNttManagerPeer"; + }, + { + code: 6006; + name: "InvalidRecipientNttManager"; + msg: "InvalidRecipientNttManager"; + }, + { + code: 6007; + name: "TransferAlreadyRedeemed"; + msg: "TransferAlreadyRedeemed"; + }, + { + code: 6008; + name: "TransferCannotBeRedeemed"; + msg: "TransferCannotBeRedeemed"; + }, + { + code: 6009; + name: "TransferNotApproved"; + msg: "TransferNotApproved"; + }, + { + code: 6010; + name: "MessageAlreadySent"; + msg: "MessageAlreadySent"; + }, + { + code: 6011; + name: "InvalidMode"; + msg: "InvalidMode"; + }, + { + code: 6012; + name: "InvalidMintAuthority"; + msg: "InvalidMintAuthority"; + }, + { + code: 6013; + name: "TransferExceedsRateLimit"; + msg: "TransferExceedsRateLimit"; + }, + { + code: 6014; + name: "Paused"; + msg: "Paused"; + }, + { + code: 6015; + name: "DisabledTransceiver"; + msg: "DisabledTransceiver"; + }, + { + code: 6016; + name: "InvalidDeployer"; + msg: "InvalidDeployer"; + }, + { + code: 6017; + name: "BadAmountAfterTransfer"; + msg: "BadAmountAfterTransfer"; + }, + { + code: 6018; + name: "BadAmountAfterBurn"; + msg: "BadAmountAfterBurn"; + }, + { + code: 6019; + name: "ZeroThreshold"; + msg: "ZeroThreshold"; + }, + { + code: 6020; + name: "OverflowExponent"; + msg: "OverflowExponent"; + }, + { + code: 6021; + name: "OverflowScaledAmount"; + msg: "OverflowScaledAmount"; + }, + { + code: 6022; + name: "BitmapIndexOutOfBounds"; + msg: "BitmapIndexOutOfBounds"; + } + ]; +}; +export const IDL: ExampleNativeTokenTransfers = { + version: "1.0.0", + name: "example_native_token_transfers", + instructions: [ + { + name: "initialize", + accounts: [ + { + name: "payer", + isMut: true, + isSigner: true, + }, + { + name: "deployer", + isMut: false, + isSigner: true, + }, + { + name: "programData", + isMut: false, + isSigner: false, + }, + { + name: "config", + isMut: true, + isSigner: false, + }, + { + name: "mint", + isMut: false, + isSigner: false, + }, + { + name: "rateLimit", + isMut: true, + isSigner: false, + }, + { + name: "tokenAuthority", + isMut: false, + isSigner: false, + }, + { + name: "custody", + isMut: true, + isSigner: false, + docs: [ + "The custody account that holds tokens in locking mode.", + "NOTE: the account is unconditionally initialized, but not used in", + "burning mode.", + "function if the token account has already been created.", + ], + }, + { + name: "tokenProgram", + isMut: false, + isSigner: false, + docs: ["associated token account for the given mint."], + }, + { + name: "associatedTokenProgram", + isMut: false, + isSigner: false, + }, + { + name: "bpfLoaderUpgradeableProgram", + isMut: false, + isSigner: false, + }, + { + name: "systemProgram", + isMut: false, + isSigner: false, + }, + ], + args: [ + { + name: "args", + type: { + defined: "InitializeArgs", + }, + }, + ], + }, + { + name: "version", + accounts: [], + args: [], + returns: "string", + }, + { + name: "transferBurn", + accounts: [ + { + name: "common", + accounts: [ + { + name: "payer", + isMut: true, + isSigner: true, + }, + { + name: "config", + accounts: [ + { + name: "config", + isMut: false, + isSigner: false, + }, + ], + }, + { + name: "mint", + isMut: true, + isSigner: false, + }, + { + name: "from", + isMut: true, + isSigner: false, + docs: ["account can spend these tokens."], + }, + { + name: "tokenProgram", + isMut: false, + isSigner: false, + }, + { + name: "outboxItem", + isMut: true, + isSigner: true, + }, + { + name: "outboxRateLimit", + isMut: true, + isSigner: false, + }, + { + name: "systemProgram", + isMut: false, + isSigner: false, + }, + ], + }, + { + name: "inboxRateLimit", + isMut: true, + isSigner: false, + }, + { + name: "peer", + isMut: false, + isSigner: false, + }, + { + name: "sessionAuthority", + isMut: false, + isSigner: false, + }, + ], + args: [ + { + name: "args", + type: { + defined: "TransferArgs", + }, + }, + ], + }, + { + name: "transferLock", + accounts: [ + { + name: "common", + accounts: [ + { + name: "payer", + isMut: true, + isSigner: true, + }, + { + name: "config", + accounts: [ + { + name: "config", + isMut: false, + isSigner: false, + }, + ], + }, + { + name: "mint", + isMut: true, + isSigner: false, + }, + { + name: "from", + isMut: true, + isSigner: false, + docs: ["account can spend these tokens."], + }, + { + name: "tokenProgram", + isMut: false, + isSigner: false, + }, + { + name: "outboxItem", + isMut: true, + isSigner: true, + }, + { + name: "outboxRateLimit", + isMut: true, + isSigner: false, + }, + { + name: "systemProgram", + isMut: false, + isSigner: false, + }, + ], + }, + { + name: "inboxRateLimit", + isMut: true, + isSigner: false, + }, + { + name: "peer", + isMut: false, + isSigner: false, + }, + { + name: "sessionAuthority", + isMut: false, + isSigner: false, + }, + { + name: "custody", + isMut: true, + isSigner: false, + }, + ], + args: [ + { + name: "args", + type: { + defined: "TransferArgs", + }, + }, + ], + }, + { + name: "redeem", + accounts: [ + { + name: "payer", + isMut: true, + isSigner: true, + }, + { + name: "config", + isMut: false, + isSigner: false, + }, + { + name: "peer", + isMut: false, + isSigner: false, + }, + { + name: "transceiverMessage", + isMut: false, + isSigner: false, + }, + { + name: "transceiver", + isMut: false, + isSigner: false, + }, + { + name: "mint", + isMut: false, + isSigner: false, + }, + { + name: "inboxItem", + isMut: true, + isSigner: false, + docs: [ + "NOTE: This account is content-addressed (PDA seeded by the message hash).", + "This is because in a multi-transceiver configuration, the different", + 'transceivers "vote" on messages (by delivering them). By making the inbox', + "items content-addressed, we can ensure that disagreeing votes don't", + "interfere with each other.", + "On the first call to [`redeem()`], [`InboxItem`] will be allocated and initialized with", + "default values.", + 'On subsequent calls, we want to modify the `InboxItem` by "voting" on it. Therefore the', + "program should not fail which would occur when using the `init` constraint.", + "The [`InboxItem::init`] field is used to guard against malicious or accidental modification", + "InboxItem fields that should remain constant.", + ], + }, + { + name: "inboxRateLimit", + isMut: true, + isSigner: false, + }, + { + name: "outboxRateLimit", + isMut: true, + isSigner: false, + }, + { + name: "systemProgram", + isMut: false, + isSigner: false, + }, + ], + args: [ + { + name: "args", + type: { + defined: "RedeemArgs", + }, + }, + ], + }, + { + name: "releaseInboundMint", + accounts: [ + { + name: "common", + accounts: [ + { + name: "payer", + isMut: true, + isSigner: true, + }, + { + name: "config", + accounts: [ + { + name: "config", + isMut: false, + isSigner: false, + }, + ], + }, + { + name: "inboxItem", + isMut: true, + isSigner: false, + }, + { + name: "recipient", + isMut: true, + isSigner: false, + }, + { + name: "tokenAuthority", + isMut: false, + isSigner: false, + }, + { + name: "mint", + isMut: true, + isSigner: false, + }, + { + name: "tokenProgram", + isMut: false, + isSigner: false, + }, + ], + }, + ], + args: [ + { + name: "args", + type: { + defined: "ReleaseInboundArgs", + }, + }, + ], + }, + { + name: "releaseInboundUnlock", + accounts: [ + { + name: "common", + accounts: [ + { + name: "payer", + isMut: true, + isSigner: true, + }, + { + name: "config", + accounts: [ + { + name: "config", + isMut: false, + isSigner: false, + }, + ], + }, + { + name: "inboxItem", + isMut: true, + isSigner: false, + }, + { + name: "recipient", + isMut: true, + isSigner: false, + }, + { + name: "tokenAuthority", + isMut: false, + isSigner: false, + }, + { + name: "mint", + isMut: true, + isSigner: false, + }, + { + name: "tokenProgram", + isMut: false, + isSigner: false, + }, + ], + }, + { + name: "custody", + isMut: true, + isSigner: false, + }, + ], + args: [ + { + name: "args", + type: { + defined: "ReleaseInboundArgs", + }, + }, + ], + }, + { + name: "transferOwnership", + accounts: [ + { + name: "config", + isMut: true, + isSigner: false, + }, + { + name: "owner", + isMut: false, + isSigner: true, + }, + { + name: "newOwner", + isMut: false, + isSigner: false, + }, + { + name: "upgradeLock", + isMut: false, + isSigner: false, + }, + { + name: "programData", + isMut: true, + isSigner: false, + }, + { + name: "bpfLoaderUpgradeableProgram", + isMut: false, + isSigner: false, + }, + ], + args: [], + }, + { + name: "claimOwnership", + accounts: [ + { + name: "config", + isMut: true, + isSigner: false, + }, + { + name: "upgradeLock", + isMut: false, + isSigner: false, + }, + { + name: "newOwner", + isMut: false, + isSigner: true, + }, + { + name: "programData", + isMut: true, + isSigner: false, + }, + { + name: "bpfLoaderUpgradeableProgram", + isMut: false, + isSigner: false, + }, + ], + args: [], + }, + { + name: "setPaused", + accounts: [ + { + name: "owner", + isMut: false, + isSigner: true, + }, + { + name: "config", + isMut: true, + isSigner: false, + }, + ], + args: [ + { + name: "pause", + type: "bool", + }, + ], + }, + { + name: "setPeer", + accounts: [ + { + name: "payer", + isMut: true, + isSigner: true, + }, + { + name: "owner", + isMut: false, + isSigner: true, + }, + { + name: "config", + isMut: false, + isSigner: false, + }, + { + name: "peer", + isMut: true, + isSigner: false, + }, + { + name: "inboxRateLimit", + isMut: true, + isSigner: false, + }, + { + name: "systemProgram", + isMut: false, + isSigner: false, + }, + ], + args: [ + { + name: "args", + type: { + defined: "SetPeerArgs", + }, + }, + ], + }, + { + name: "registerTransceiver", + accounts: [ + { + name: "config", + isMut: true, + isSigner: false, + }, + { + name: "owner", + isMut: false, + isSigner: true, + }, + { + name: "payer", + isMut: true, + isSigner: true, + }, + { + name: "transceiver", + isMut: false, + isSigner: false, + }, + { + name: "registeredTransceiver", + isMut: true, + isSigner: false, + }, + { + name: "systemProgram", + isMut: false, + isSigner: false, + }, + ], + args: [], + }, + { + name: "setOutboundLimit", + accounts: [ + { + name: "config", + isMut: false, + isSigner: false, + }, + { + name: "owner", + isMut: false, + isSigner: true, + }, + { + name: "rateLimit", + isMut: true, + isSigner: false, + }, + ], + args: [ + { + name: "args", + type: { + defined: "SetOutboundLimitArgs", + }, + }, + ], + }, + { + name: "setInboundLimit", + accounts: [ + { + name: "config", + isMut: false, + isSigner: false, + }, + { + name: "owner", + isMut: false, + isSigner: true, + }, + { + name: "rateLimit", + isMut: true, + isSigner: false, + }, + ], + args: [ + { + name: "args", + type: { + defined: "SetInboundLimitArgs", + }, + }, + ], + }, + { + name: "setWormholePeer", + accounts: [ + { + name: "config", + isMut: false, + isSigner: false, + }, + { + name: "owner", + isMut: false, + isSigner: true, + }, + { + name: "payer", + isMut: true, + isSigner: true, + }, + { + name: "peer", + isMut: true, + isSigner: false, + }, + { + name: "systemProgram", + isMut: false, + isSigner: false, + }, + ], + args: [ + { + name: "args", + type: { + defined: "SetTransceiverPeerArgs", + }, + }, + ], + }, + { + name: "receiveWormholeMessage", + accounts: [ + { + name: "payer", + isMut: true, + isSigner: true, + }, + { + name: "config", + accounts: [ + { + name: "config", + isMut: false, + isSigner: false, + }, + ], + }, + { + name: "peer", + isMut: false, + isSigner: false, + }, + { + name: "vaa", + isMut: false, + isSigner: false, + }, + { + name: "transceiverMessage", + isMut: true, + isSigner: false, + }, + { + name: "systemProgram", + isMut: false, + isSigner: false, + }, + ], + args: [], + }, + { + name: "releaseWormholeOutbound", + accounts: [ + { + name: "payer", + isMut: true, + isSigner: true, + }, + { + name: "config", + accounts: [ + { + name: "config", + isMut: false, + isSigner: false, + }, + ], + }, + { + name: "outboxItem", + isMut: true, + isSigner: false, + }, + { + name: "transceiver", + isMut: false, + isSigner: false, + }, + { + name: "wormholeMessage", + isMut: true, + isSigner: false, + }, + { + name: "emitter", + isMut: false, + isSigner: false, + }, + { + name: "wormhole", + accounts: [ + { + name: "bridge", + isMut: true, + isSigner: false, + }, + { + name: "feeCollector", + isMut: true, + isSigner: false, + }, + { + name: "sequence", + isMut: true, + isSigner: false, + }, + { + name: "program", + isMut: false, + isSigner: false, + }, + { + name: "systemProgram", + isMut: false, + isSigner: false, + }, + { + name: "clock", + isMut: false, + isSigner: false, + }, + { + name: "rent", + isMut: false, + isSigner: false, + }, + ], + }, + ], + args: [ + { + name: "args", + type: { + defined: "ReleaseOutboundArgs", + }, + }, + ], + }, + { + name: "broadcastWormholeId", + accounts: [ + { + name: "payer", + isMut: true, + isSigner: true, + }, + { + name: "config", + isMut: false, + isSigner: false, + }, + { + name: "mint", + isMut: false, + isSigner: false, + }, + { + name: "wormholeMessage", + isMut: true, + isSigner: true, + }, + { + name: "emitter", + isMut: false, + isSigner: false, + }, + { + name: "wormhole", + accounts: [ + { + name: "bridge", + isMut: true, + isSigner: false, + }, + { + name: "feeCollector", + isMut: true, + isSigner: false, + }, + { + name: "sequence", + isMut: true, + isSigner: false, + }, + { + name: "program", + isMut: false, + isSigner: false, + }, + { + name: "systemProgram", + isMut: false, + isSigner: false, + }, + { + name: "clock", + isMut: false, + isSigner: false, + }, + { + name: "rent", + isMut: false, + isSigner: false, + }, + ], + }, + ], + args: [], + }, + { + name: "broadcastWormholePeer", + accounts: [ + { + name: "payer", + isMut: true, + isSigner: true, + }, + { + name: "config", + isMut: false, + isSigner: false, + }, + { + name: "peer", + isMut: false, + isSigner: false, + }, + { + name: "wormholeMessage", + isMut: true, + isSigner: true, + }, + { + name: "emitter", + isMut: false, + isSigner: false, + }, + { + name: "wormhole", + accounts: [ + { + name: "bridge", + isMut: true, + isSigner: false, + }, + { + name: "feeCollector", + isMut: true, + isSigner: false, + }, + { + name: "sequence", + isMut: true, + isSigner: false, + }, + { + name: "program", + isMut: false, + isSigner: false, + }, + { + name: "systemProgram", + isMut: false, + isSigner: false, + }, + { + name: "clock", + isMut: false, + isSigner: false, + }, + { + name: "rent", + isMut: false, + isSigner: false, + }, + ], + }, + ], + args: [ + { + name: "args", + type: { + defined: "BroadcastPeerArgs", + }, + }, + ], + }, + ], + accounts: [ + { + name: "config", + type: { + kind: "struct", + fields: [ + { + name: "bump", + type: "u8", + }, + { + name: "owner", + docs: ["Owner of the program."], + type: "publicKey", + }, + { + name: "pendingOwner", + docs: ["Pending next owner (before claiming ownership)."], + type: { + option: "publicKey", + }, + }, + { + name: "mint", + docs: ["Mint address of the token managed by this program."], + type: "publicKey", + }, + { + name: "tokenProgram", + docs: [ + "Address of the token program (token or token22). This could always be queried", + "from the [`mint`] account's owner, but storing it here avoids an indirection", + "on the client side.", + ], + type: "publicKey", + }, + { + name: "mode", + docs: [ + "The mode that this program is running in. This is used to determine", + "whether the program is burning tokens or locking tokens.", + ], + type: { + defined: "Mode", + }, + }, + { + name: "chainId", + docs: [ + "The chain id of the chain that this program is running on. We don't", + "hardcode this so that the program is deployable on any potential SVM", + "forks.", + ], + type: { + defined: "ChainId", + }, + }, + { + name: "nextTransceiverId", + docs: [ + "The next transceiver id to use when registering an transceiver.", + ], + type: "u8", + }, + { + name: "threshold", + docs: [ + "The number of transceivers that must attest to a transfer before it is", + "accepted.", + ], + type: "u8", + }, + { + name: "enabledTransceivers", + docs: [ + "Bitmap of enabled transceivers.", + "The maximum number of transceivers is equal to [`Bitmap::BITS`].", + ], + type: { + defined: "Bitmap", + }, + }, + { + name: "paused", + docs: [ + "Pause the program. This is useful for upgrades and other maintenance.", + ], + type: "bool", + }, + { + name: "custody", + docs: ["The custody account that holds tokens in locking mode."], + type: "publicKey", + }, + ], + }, + }, + { + name: "nttManagerPeer", + docs: [ + "A peer on another chain. Stored in a PDA seeded by the chain id.", + ], + type: { + kind: "struct", + fields: [ + { + name: "bump", + type: "u8", + }, + { + name: "address", + type: { + array: ["u8", 32], + }, + }, + { + name: "tokenDecimals", + type: "u8", + }, + ], + }, + }, + { + name: "inboxItem", + type: { + kind: "struct", + fields: [ + { + name: "init", + type: "bool", + }, + { + name: "bump", + type: "u8", + }, + { + name: "amount", + type: "u64", + }, + { + name: "recipientAddress", + type: "publicKey", + }, + { + name: "votes", + type: { + defined: "Bitmap", + }, + }, + { + name: "releaseStatus", + type: { + defined: "ReleaseStatus", + }, + }, + ], + }, + }, + { + name: "inboxRateLimit", + docs: [ + "Inbound rate limit per chain.", + "SECURITY: must check the PDA (since there are multiple PDAs, namely one for each chain.)", + ], + type: { + kind: "struct", + fields: [ + { + name: "bump", + type: "u8", + }, + { + name: "rateLimit", + type: { + defined: "RateLimitState", + }, + }, + ], + }, + }, + { + name: "outboxItem", + type: { + kind: "struct", + fields: [ + { + name: "amount", + type: { + defined: "TrimmedAmount", + }, + }, + { + name: "sender", + type: "publicKey", + }, + { + name: "recipientChain", + type: { + defined: "ChainId", + }, + }, + { + name: "recipientNttManager", + type: { + array: ["u8", 32], + }, + }, + { + name: "recipientAddress", + type: { + array: ["u8", 32], + }, + }, + { + name: "releaseTimestamp", + type: "i64", + }, + { + name: "released", + type: { + defined: "Bitmap", + }, + }, + ], + }, + }, + { + name: "outboxRateLimit", + type: { + kind: "struct", + fields: [ + { + name: "rateLimit", + type: { + defined: "RateLimitState", + }, + }, + ], + }, + }, + { + name: "registeredTransceiver", + type: { + kind: "struct", + fields: [ + { + name: "bump", + type: "u8", + }, + { + name: "id", + type: "u8", + }, + { + name: "transceiverAddress", + type: "publicKey", + }, + ], + }, + }, + { + name: "transceiverPeer", + docs: [ + "A peer on another chain. Stored in a PDA seeded by the chain id.", + ], + type: { + kind: "struct", + fields: [ + { + name: "bump", + type: "u8", + }, + { + name: "address", + type: { + array: ["u8", 32], + }, + }, + ], + }, + }, + { + name: "bridgeData", + type: { + kind: "struct", + fields: [ + { + name: "guardianSetIndex", + docs: [ + "The current guardian set index, used to decide which signature sets to accept.", + ], + type: "u32", + }, + { + name: "lastLamports", + docs: ["Lamports in the collection account"], + type: "u64", + }, + { + name: "config", + docs: [ + "Bridge configuration, which is set once upon initialization.", + ], + type: { + defined: "BridgeConfig", + }, + }, + ], + }, + }, + ], + types: [ + { + name: "Bitmap", + type: { + kind: "struct", + fields: [ + { + name: "map", + type: "u128", + }, + ], + }, + }, + { + name: "SetInboundLimitArgs", + type: { + kind: "struct", + fields: [ + { + name: "limit", + type: "u64", + }, + { + name: "chainId", + type: { + defined: "ChainId", + }, + }, + ], + }, + }, + { + name: "SetOutboundLimitArgs", + type: { + kind: "struct", + fields: [ + { + name: "limit", + type: "u64", + }, + ], + }, + }, + { + name: "SetPeerArgs", + type: { + kind: "struct", + fields: [ + { + name: "chainId", + type: { + defined: "ChainId", + }, + }, + { + name: "address", + type: { + array: ["u8", 32], + }, + }, + { + name: "limit", + type: "u64", + }, + { + name: "tokenDecimals", + docs: ["The token decimals on the peer chain."], + type: "u8", + }, + ], + }, + }, + { + name: "InitializeArgs", + type: { + kind: "struct", + fields: [ + { + name: "chainId", + type: "u16", + }, + { + name: "limit", + type: "u64", + }, + { + name: "mode", + type: { + defined: "Mode", + }, + }, + ], + }, + }, + { + name: "RedeemArgs", + type: { + kind: "struct", + fields: [], + }, + }, + { + name: "ReleaseInboundArgs", + type: { + kind: "struct", + fields: [ + { + name: "revertOnDelay", + type: "bool", + }, + ], + }, + }, + { + name: "TransferArgs", + type: { + kind: "struct", + fields: [ + { + name: "amount", + type: "u64", + }, + { + name: "recipientChain", + type: { + defined: "ChainId", + }, + }, + { + name: "recipientAddress", + type: { + array: ["u8", 32], + }, + }, + { + name: "shouldQueue", + type: "bool", + }, + ], + }, + }, + { + name: "ReleaseStatus", + docs: [ + "The status of an InboxItem. This determines whether the tokens are minted/unlocked to the recipient. As", + "such, this must be used as a state machine that moves forward in a linear manner. A state", + 'should never "move backward" to a previous state (e.g. should never move from `Released` to', + "`ReleaseAfter`).", + ], + type: { + kind: "enum", + variants: [ + { + name: "NotApproved", + }, + { + name: "ReleaseAfter", + fields: ["i64"], + }, + { + name: "Released", + }, + ], + }, + }, + { + name: "RateLimitState", + type: { + kind: "struct", + fields: [ + { + name: "limit", + docs: ["The maximum capacity of the rate limiter."], + type: "u64", + }, + { + name: "capacityAtLastTx", + docs: [ + "The capacity of the rate limiter at `last_tx_timestamp`.", + "The actual current capacity is calculated in `capacity_at`, by", + "accounting for the time that has passed since `last_tx_timestamp` and", + "the refill rate.", + ], + type: "u64", + }, + { + name: "lastTxTimestamp", + docs: [ + "The timestamp of the last transaction that counted towards the current", + "capacity. Transactions that exceeded the capacity do not count, they are", + "just delayed.", + ], + type: "i64", + }, + ], + }, + }, + { + name: "SetTransceiverPeerArgs", + type: { + kind: "struct", + fields: [ + { + name: "chainId", + type: { + defined: "ChainId", + }, + }, + { + name: "address", + type: { + array: ["u8", 32], + }, + }, + ], + }, + }, + { + name: "BroadcastPeerArgs", + type: { + kind: "struct", + fields: [ + { + name: "chainId", + type: "u16", + }, + ], + }, + }, + { + name: "ReleaseOutboundArgs", + type: { + kind: "struct", + fields: [ + { + name: "revertOnDelay", + type: "bool", + }, + ], + }, + }, + { + name: "ChainId", + type: { + kind: "struct", + fields: [ + { + name: "id", + type: "u16", + }, + ], + }, + }, + { + name: "Mode", + type: { + kind: "enum", + variants: [ + { + name: "Locking", + }, + { + name: "Burning", + }, + ], + }, + }, + { + name: "TrimmedAmount", + type: { + kind: "struct", + fields: [ + { + name: "amount", + type: "u64", + }, + { + name: "decimals", + type: "u8", + }, + ], + }, + }, + { + name: "BridgeConfig", + type: { + kind: "struct", + fields: [ + { + name: "guardianSetExpirationTime", + docs: [ + "Period for how long a guardian set is valid after it has been replaced by a new one. This", + "guarantees that VAAs issued by that set can still be submitted for a certain period. In", + "this period we still trust the old guardian set.", + ], + type: "u32", + }, + { + name: "fee", + docs: [ + "Amount of lamports that needs to be paid to the protocol to post a message", + ], + type: "u64", + }, + ], + }, + }, + ], + errors: [ + { + code: 6000, + name: "CantReleaseYet", + msg: "CantReleaseYet", + }, + { + code: 6001, + name: "InvalidPendingOwner", + msg: "InvalidPendingOwner", + }, + { + code: 6002, + name: "InvalidChainId", + msg: "InvalidChainId", + }, + { + code: 6003, + name: "InvalidRecipientAddress", + msg: "InvalidRecipientAddress", + }, + { + code: 6004, + name: "InvalidTransceiverPeer", + msg: "InvalidTransceiverPeer", + }, + { + code: 6005, + name: "InvalidNttManagerPeer", + msg: "InvalidNttManagerPeer", + }, + { + code: 6006, + name: "InvalidRecipientNttManager", + msg: "InvalidRecipientNttManager", + }, + { + code: 6007, + name: "TransferAlreadyRedeemed", + msg: "TransferAlreadyRedeemed", + }, + { + code: 6008, + name: "TransferCannotBeRedeemed", + msg: "TransferCannotBeRedeemed", + }, + { + code: 6009, + name: "TransferNotApproved", + msg: "TransferNotApproved", + }, + { + code: 6010, + name: "MessageAlreadySent", + msg: "MessageAlreadySent", + }, + { + code: 6011, + name: "InvalidMode", + msg: "InvalidMode", + }, + { + code: 6012, + name: "InvalidMintAuthority", + msg: "InvalidMintAuthority", + }, + { + code: 6013, + name: "TransferExceedsRateLimit", + msg: "TransferExceedsRateLimit", + }, + { + code: 6014, + name: "Paused", + msg: "Paused", + }, + { + code: 6015, + name: "DisabledTransceiver", + msg: "DisabledTransceiver", + }, + { + code: 6016, + name: "InvalidDeployer", + msg: "InvalidDeployer", + }, + { + code: 6017, + name: "BadAmountAfterTransfer", + msg: "BadAmountAfterTransfer", + }, + { + code: 6018, + name: "BadAmountAfterBurn", + msg: "BadAmountAfterBurn", + }, + { + code: 6019, + name: "ZeroThreshold", + msg: "ZeroThreshold", + }, + { + code: 6020, + name: "OverflowExponent", + msg: "OverflowExponent", + }, + { + code: 6021, + name: "OverflowScaledAmount", + msg: "OverflowScaledAmount", + }, + { + code: 6022, + name: "BitmapIndexOutOfBounds", + msg: "BitmapIndexOutOfBounds", + }, + ], +}; diff --git a/sdk/solana/src/anchor-idl/2_0_0/ntt_quoter.ts b/solana/ts/idl/1_0_0/ts/ntt_quoter.ts similarity index 99% rename from sdk/solana/src/anchor-idl/2_0_0/ntt_quoter.ts rename to solana/ts/idl/1_0_0/ts/ntt_quoter.ts index 063f2ec30..2f4d3022e 100644 --- a/sdk/solana/src/anchor-idl/2_0_0/ntt_quoter.ts +++ b/solana/ts/idl/1_0_0/ts/ntt_quoter.ts @@ -585,8 +585,7 @@ export type NttQuoter = { "msg": "The price cannot be zero" } ] -}; - +} export const IDL: NttQuoter = { "version": "2.0.0", "name": "ntt_quoter", @@ -1174,4 +1173,5 @@ export const IDL: NttQuoter = { "msg": "The price cannot be zero" } ] -}; +} + diff --git a/sdk/solana/src/anchor-idl/1_0_0/wormhole_governance.ts b/solana/ts/idl/1_0_0/ts/wormhole_governance.ts similarity index 99% rename from sdk/solana/src/anchor-idl/1_0_0/wormhole_governance.ts rename to solana/ts/idl/1_0_0/ts/wormhole_governance.ts index 8e3549f32..557ab9378 100644 --- a/sdk/solana/src/anchor-idl/1_0_0/wormhole_governance.ts +++ b/solana/ts/idl/1_0_0/ts/wormhole_governance.ts @@ -65,8 +65,7 @@ export type WormholeGovernance = { "msg": "InvalidGovernanceEmitter" } ] -}; - +} export const IDL: WormholeGovernance = { "version": "1.0.0", "name": "wormhole_governance", @@ -134,4 +133,5 @@ export const IDL: WormholeGovernance = { "msg": "InvalidGovernanceEmitter" } ] -}; +} + diff --git a/solana/idl/json/dummy_transfer_hook.json b/solana/ts/idl/2_0_0/json/dummy_transfer_hook.json similarity index 100% rename from solana/idl/json/dummy_transfer_hook.json rename to solana/ts/idl/2_0_0/json/dummy_transfer_hook.json diff --git a/sdk/solana/src/anchor-idl/2_0_0/example_native_token_transfers.json b/solana/ts/idl/2_0_0/json/example_native_token_transfers.json similarity index 100% rename from sdk/solana/src/anchor-idl/2_0_0/example_native_token_transfers.json rename to solana/ts/idl/2_0_0/json/example_native_token_transfers.json diff --git a/solana/idl/json/ntt_quoter.json b/solana/ts/idl/2_0_0/json/ntt_quoter.json similarity index 100% rename from solana/idl/json/ntt_quoter.json rename to solana/ts/idl/2_0_0/json/ntt_quoter.json diff --git a/sdk/solana/src/anchor-idl/2_0_0/wormhole_governance.json b/solana/ts/idl/2_0_0/json/wormhole_governance.json similarity index 100% rename from sdk/solana/src/anchor-idl/2_0_0/wormhole_governance.json rename to solana/ts/idl/2_0_0/json/wormhole_governance.json diff --git a/sdk/solana/src/anchor-idl/2_0_0/dummy_transfer_hook.ts b/solana/ts/idl/2_0_0/ts/dummy_transfer_hook.ts similarity index 99% rename from sdk/solana/src/anchor-idl/2_0_0/dummy_transfer_hook.ts rename to solana/ts/idl/2_0_0/ts/dummy_transfer_hook.ts index 25e31bff3..3d6d66a9b 100644 --- a/sdk/solana/src/anchor-idl/2_0_0/dummy_transfer_hook.ts +++ b/solana/ts/idl/2_0_0/ts/dummy_transfer_hook.ts @@ -107,8 +107,7 @@ export type DummyTransferHook = { } } ] -}; - +} export const IDL: DummyTransferHook = { "version": "2.0.0", "name": "dummy_transfer_hook", @@ -218,4 +217,5 @@ export const IDL: DummyTransferHook = { } } ] -}; +} + diff --git a/sdk/solana/src/anchor-idl/2_0_0/example_native_token_transfers.ts b/solana/ts/idl/2_0_0/ts/example_native_token_transfers.ts similarity index 95% rename from sdk/solana/src/anchor-idl/2_0_0/example_native_token_transfers.ts rename to solana/ts/idl/2_0_0/ts/example_native_token_transfers.ts index 4a7fceeeb..9f013f092 100644 --- a/sdk/solana/src/anchor-idl/2_0_0/example_native_token_transfers.ts +++ b/solana/ts/idl/2_0_0/ts/example_native_token_transfers.ts @@ -1261,38 +1261,6 @@ export type ExampleNativeTokenTransfers = { ] } }, - { - "name": "validatedTransceiverMessage", - "generics": [ - "A" - ], - "type": { - "kind": "struct", - "fields": [ - { - "name": "fromChain", - "type": { - "defined": "ChainId" - } - }, - { - "name": "message", - "type": { - "definedWithTypeArgs": { - "name": "TransceiverMessageData", - "args": [ - { - "type": { - "generic": "A" - } - } - ] - } - } - } - ] - } - }, { "name": "nttManagerPeer", "docs": [ @@ -1803,85 +1771,6 @@ export type ExampleNativeTokenTransfers = { ] } }, - { - "name": "NttManagerMessage", - "generics": [ - "A" - ], - "type": { - "kind": "struct", - "fields": [ - { - "name": "id", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "sender", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "payload", - "type": { - "generic": "A" - } - } - ] - } - }, - { - "name": "TransceiverMessageData", - "generics": [ - "A" - ], - "type": { - "kind": "struct", - "fields": [ - { - "name": "sourceNttManager", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "recipientNttManager", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "nttManagerPayload", - "type": { - "definedWithTypeArgs": { - "name": "NttManagerMessage", - "args": [ - { - "type": { - "generic": "A" - } - } - ] - } - } - } - ] - } - }, { "name": "TrimmedAmount", "type": { @@ -2040,8 +1929,7 @@ export type ExampleNativeTokenTransfers = { "msg": "BitmapIndexOutOfBounds" } ] -}; - +} export const IDL: ExampleNativeTokenTransfers = { "version": "2.0.0", "name": "example_native_token_transfers", @@ -3305,38 +3193,6 @@ export const IDL: ExampleNativeTokenTransfers = { ] } }, - { - "name": "validatedTransceiverMessage", - "generics": [ - "A" - ], - "type": { - "kind": "struct", - "fields": [ - { - "name": "fromChain", - "type": { - "defined": "ChainId" - } - }, - { - "name": "message", - "type": { - "definedWithTypeArgs": { - "name": "TransceiverMessageData", - "args": [ - { - "type": { - "generic": "A" - } - } - ] - } - } - } - ] - } - }, { "name": "nttManagerPeer", "docs": [ @@ -3847,85 +3703,6 @@ export const IDL: ExampleNativeTokenTransfers = { ] } }, - { - "name": "NttManagerMessage", - "generics": [ - "A" - ], - "type": { - "kind": "struct", - "fields": [ - { - "name": "id", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "sender", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "payload", - "type": { - "generic": "A" - } - } - ] - } - }, - { - "name": "TransceiverMessageData", - "generics": [ - "A" - ], - "type": { - "kind": "struct", - "fields": [ - { - "name": "sourceNttManager", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "recipientNttManager", - "type": { - "array": [ - "u8", - 32 - ] - } - }, - { - "name": "nttManagerPayload", - "type": { - "definedWithTypeArgs": { - "name": "NttManagerMessage", - "args": [ - { - "type": { - "generic": "A" - } - } - ] - } - } - } - ] - } - }, { "name": "TrimmedAmount", "type": { @@ -4084,4 +3861,5 @@ export const IDL: ExampleNativeTokenTransfers = { "msg": "BitmapIndexOutOfBounds" } ] -}; +} + diff --git a/solana/idl/ts/ntt_quoter.ts b/solana/ts/idl/2_0_0/ts/ntt_quoter.ts similarity index 99% rename from solana/idl/ts/ntt_quoter.ts rename to solana/ts/idl/2_0_0/ts/ntt_quoter.ts index 063f2ec30..2f4d3022e 100644 --- a/solana/idl/ts/ntt_quoter.ts +++ b/solana/ts/idl/2_0_0/ts/ntt_quoter.ts @@ -585,8 +585,7 @@ export type NttQuoter = { "msg": "The price cannot be zero" } ] -}; - +} export const IDL: NttQuoter = { "version": "2.0.0", "name": "ntt_quoter", @@ -1174,4 +1173,5 @@ export const IDL: NttQuoter = { "msg": "The price cannot be zero" } ] -}; +} + diff --git a/sdk/solana/src/anchor-idl/2_0_0/wormhole_governance.ts b/solana/ts/idl/2_0_0/ts/wormhole_governance.ts similarity index 99% rename from sdk/solana/src/anchor-idl/2_0_0/wormhole_governance.ts rename to solana/ts/idl/2_0_0/ts/wormhole_governance.ts index b988f040d..2cba02069 100644 --- a/sdk/solana/src/anchor-idl/2_0_0/wormhole_governance.ts +++ b/solana/ts/idl/2_0_0/ts/wormhole_governance.ts @@ -73,8 +73,7 @@ export type WormholeGovernance = { "msg": "InvalidGovernanceProgram" } ] -}; - +} export const IDL: WormholeGovernance = { "version": "2.0.0", "name": "wormhole_governance", @@ -150,4 +149,5 @@ export const IDL: WormholeGovernance = { "msg": "InvalidGovernanceProgram" } ] -}; +} + diff --git a/solana/ts/index.ts b/solana/ts/index.ts new file mode 100644 index 000000000..0cd413115 --- /dev/null +++ b/solana/ts/index.ts @@ -0,0 +1,2 @@ +export * from "./sdk/index.js"; +export * from "./lib/index.js"; diff --git a/solana/ts/lib/anchor-idl/1_0_0.ts b/solana/ts/lib/anchor-idl/1_0_0.ts new file mode 100644 index 000000000..bca149d6e --- /dev/null +++ b/solana/ts/lib/anchor-idl/1_0_0.ts @@ -0,0 +1,13 @@ +import { type ExampleNativeTokenTransfers } from "../../idl/1_0_0/ts/example_native_token_transfers.js"; +import { IDL as ntt } from "../../idl/1_0_0/ts/example_native_token_transfers.js"; +import { type NttQuoter } from "../../idl/1_0_0/ts/ntt_quoter.js"; +import { IDL as quoter } from "../../idl/1_0_0/ts/ntt_quoter.js"; +import { type WormholeGovernance } from "../../idl/1_0_0/ts/wormhole_governance.js"; +import { IDL as governance } from "../../idl/1_0_0/ts/wormhole_governance.js"; + +export namespace _1_0_0 { + export const idl = { ntt, quoter, governance }; + export type RawExampleNativeTokenTransfers = ExampleNativeTokenTransfers; + export type RawNttQuoter = NttQuoter; + export type RawWormholeGovernance = WormholeGovernance; +} diff --git a/solana/ts/lib/anchor-idl/2_0_0.ts b/solana/ts/lib/anchor-idl/2_0_0.ts new file mode 100644 index 000000000..1b98d0f92 --- /dev/null +++ b/solana/ts/lib/anchor-idl/2_0_0.ts @@ -0,0 +1,13 @@ +import { type ExampleNativeTokenTransfers } from "../../idl/2_0_0/ts/example_native_token_transfers.js"; +import { IDL as ntt } from "../../idl/2_0_0/ts/example_native_token_transfers.js"; +import { type NttQuoter } from "../../idl/2_0_0/ts/ntt_quoter.js"; +import { IDL as quoter } from "../../idl/2_0_0/ts/ntt_quoter.js"; +import { type WormholeGovernance } from "../../idl/2_0_0/ts/wormhole_governance.js"; +import { IDL as governance } from "../../idl/2_0_0/ts/wormhole_governance.js"; + +export namespace _2_0_0 { + export const idl = { ntt, quoter, governance }; + export type RawExampleNativeTokenTransfers = ExampleNativeTokenTransfers; + export type RawNttQuoter = NttQuoter; + export type RawWormholeGovernance = WormholeGovernance; +} diff --git a/solana/ts/lib/anchor-idl/index.ts b/solana/ts/lib/anchor-idl/index.ts new file mode 100644 index 000000000..9c472b912 --- /dev/null +++ b/solana/ts/lib/anchor-idl/index.ts @@ -0,0 +1,2 @@ +export * from "./1_0_0.js"; +export * from "./2_0_0.js"; diff --git a/solana/ts/lib/bindings.ts b/solana/ts/lib/bindings.ts new file mode 100644 index 000000000..39b413478 --- /dev/null +++ b/solana/ts/lib/bindings.ts @@ -0,0 +1,66 @@ +import { IdlAccounts, Program } from "@coral-xyz/anchor"; +import { Connection } from "@solana/web3.js"; +import { _1_0_0, _2_0_0 } from "./anchor-idl/index.js"; + +export interface IdlBinding { + idl: { + ntt: NttBindings.NativeTokenTransfer; + quoter: NttBindings.Quoter; + }; +} + +export const IdlVersions = { + "1.0.0": _1_0_0, + "2.0.0": _2_0_0, +} as const; + +export type IdlVersion = keyof typeof IdlVersions; + +export namespace NttBindings { + export type NativeTokenTransfer = V extends "1.0.0" + ? _1_0_0.RawExampleNativeTokenTransfers + : _2_0_0.RawExampleNativeTokenTransfers; + + export type Quoter = V extends "1.0.0" + ? _1_0_0.RawNttQuoter + : _2_0_0.RawNttQuoter; + + type ProgramAccounts = IdlAccounts< + NttBindings.NativeTokenTransfer + >; + + export type Config = ProgramAccounts["config"]; + export type InboxItem = ProgramAccounts["inboxItem"]; +} + +function loadIdlVersion(version: V): IdlBinding { + if (!(version in IdlVersions)) + throw new Error(`Unknown IDL version: ${version}`); + return IdlVersions[version] as unknown as IdlBinding; +} + +export function getNttProgram( + connection: Connection, + address: string, + version: V +): Program> { + const { + idl: { ntt }, + } = loadIdlVersion(version); + return new Program>(ntt, address, { + connection, + }); +} + +export function getQuoterProgram( + connection: Connection, + address: string, + version: V +) { + const { + idl: { quoter }, + } = loadIdlVersion(version); + return new Program>(quoter, address, { + connection, + }); +} diff --git a/solana/ts/lib/index.ts b/solana/ts/lib/index.ts new file mode 100644 index 000000000..660973924 --- /dev/null +++ b/solana/ts/lib/index.ts @@ -0,0 +1,4 @@ +export * from "./ntt.js"; +export * from "./quoter.js"; +export * from "./bindings.js"; +export * from "./anchor-idl/index.js"; diff --git a/solana/ts/lib/ntt.ts b/solana/ts/lib/ntt.ts new file mode 100644 index 000000000..c4740df7f --- /dev/null +++ b/solana/ts/lib/ntt.ts @@ -0,0 +1,1150 @@ +import { + BN, + Program, + parseIdlErrors, + translateError, + web3, +} from "@coral-xyz/anchor"; +import * as splToken from "@solana/spl-token"; +import { + AccountMeta, + AddressLookupTableAccount, + AddressLookupTableProgram, + Commitment, + Connection, + Keypair, + PublicKey, + PublicKeyInitData, + SystemProgram, + Transaction, + TransactionInstruction, + TransactionMessage, + VersionedTransaction, +} from "@solana/web3.js"; +import { + Chain, + ChainAddress, + ChainId, + VAA, + deserializeLayout, + encoding, + keccak256, + rpc, + toChain, + toChainId, +} from "@wormhole-foundation/sdk-connect"; + +import { Ntt } from "@wormhole-foundation/sdk-definitions-ntt"; + +import { getAssociatedTokenAddressSync } from "@solana/spl-token"; +import { SolanaTransaction } from "@wormhole-foundation/sdk-solana"; +import { utils } from "@wormhole-foundation/sdk-solana-core"; +import { + IdlVersion, + IdlVersions, + NttBindings, + getNttProgram, +} from "./bindings.js"; +import { + BPF_LOADER_UPGRADEABLE_PROGRAM_ID, + chainToBytes, + derivePda, + parseVersion, + programDataAddress, + programVersionLayout, +} from "./utils.js"; + +export namespace NTT { + /** Arguments for transfer instruction */ + export interface TransferArgs { + amount: BN; + recipientChain: { id: ChainId }; + recipientAddress: number[]; + shouldQueue: boolean; + } + + /** utility to create TransferArgs from SDK types */ + export function transferArgs( + amount: bigint, + recipient: ChainAddress, + shouldQueue: boolean + ): TransferArgs { + return { + amount: new BN(amount.toString()), + recipientChain: { id: toChainId(recipient.chain) }, + recipientAddress: Array.from( + recipient.address.toUniversalAddress().toUint8Array() + ), + shouldQueue: shouldQueue, + }; + } + + /** Type of object containing methods to compute program addresses */ + export type Pdas = ReturnType; + /** pdas returns an object containing all functions to compute program addresses */ + export const pdas = (programId: PublicKeyInitData) => { + const configAccount = (): PublicKey => derivePda("config", programId); + const emitterAccount = (): PublicKey => derivePda("emitter", programId); + const inboxRateLimitAccount = (chain: Chain): PublicKey => + derivePda(["inbox_rate_limit", chainToBytes(chain)], programId); + const inboxItemAccount = ( + chain: Chain, + nttMessage: Ntt.Message + ): PublicKey => + derivePda( + ["inbox_item", Ntt.messageDigest(chain, nttMessage)], + programId + ); + const outboxRateLimitAccount = (): PublicKey => + derivePda("outbox_rate_limit", programId); + const tokenAuthority = (): PublicKey => + derivePda("token_authority", programId); + const peerAccount = (chain: Chain): PublicKey => + derivePda(["peer", chainToBytes(chain)], programId); + const transceiverPeerAccount = (chain: Chain): PublicKey => + derivePda(["transceiver_peer", chainToBytes(chain)], programId); + const registeredTransceiver = (transceiver: PublicKey): PublicKey => + derivePda(["registered_transceiver", transceiver.toBytes()], programId); + const transceiverMessageAccount = ( + chain: Chain, + id: Uint8Array + ): PublicKey => + derivePda(["transceiver_message", chainToBytes(chain), id], programId); + const wormholeMessageAccount = (outboxItem: PublicKey): PublicKey => + derivePda(["message", outboxItem.toBytes()], programId); + const lutAccount = (): PublicKey => derivePda("lut", programId); + const lutAuthority = (): PublicKey => derivePda("lut_authority", programId); + const sessionAuthority = ( + sender: PublicKey, + args: TransferArgs + ): PublicKey => + derivePda( + [ + "session_authority", + sender.toBytes(), + keccak256( + encoding.bytes.concat( + encoding.bytes.zpad(new Uint8Array(args.amount.toArray()), 8), + chainToBytes(args.recipientChain.id), + new Uint8Array(args.recipientAddress), + new Uint8Array([args.shouldQueue ? 1 : 0]) + ) + ), + ], + programId + ); + + // TODO: memoize? + return { + configAccount, + outboxRateLimitAccount, + inboxRateLimitAccount, + inboxItemAccount, + sessionAuthority, + tokenAuthority, + emitterAccount, + wormholeMessageAccount, + peerAccount, + transceiverPeerAccount, + transceiverMessageAccount, + registeredTransceiver, + lutAccount, + lutAuthority, + }; + }; + + export async function getVersion( + connection: Connection, + programId: PublicKey, + sender?: PublicKey + ): Promise { + // the anchor library has a built-in method to read view functions. However, + // it requires a signer, which would trigger a wallet prompt on the frontend. + // Instead, we manually construct a versioned transaction and call the + // simulate function with sigVerify: false below. + // + // This way, the simulation won't require a signer, but it still requires + // the pubkey of an account that has some lamports in it (since the + // simulation checks if the account has enough money to pay for the transaction). + // + // It's a little unfortunate but it's the best we can do. + + if (!sender) { + const address = + connection.rpcEndpoint === rpc.rpcAddress("Devnet", "Solana") + ? "6sbzC1eH4FTujJXWj51eQe25cYvr4xfXbJ1vAj7j2k5J" // The CI pubkey, funded on ci network + : connection.rpcEndpoint.startsWith("http://localhost") + ? "98evdAiWr7ey9MAQzoQQMwFQkTsSR6KkWQuFqKrgwNwb" // the anchor pubkey, funded on local network + : "Hk3SdYTJFpawrvRz4qRztuEt2SqoCG7BGj2yJfDJSFbJ"; // The default pubkey is funded on mainnet and devnet we need a funded account to simulate the transaction below + sender = new PublicKey(address); + } + + const program = getNttProgram(connection, programId.toString(), "1.0.0"); + + const ix = await program.methods.version().accountsStrict({}).instruction(); + const { blockhash } = + await program.provider.connection.getLatestBlockhash(); + const msg = new TransactionMessage({ + payerKey: sender, + recentBlockhash: blockhash, + instructions: [ix], + }).compileToV0Message(); + + const tx = new VersionedTransaction(msg); + + const txSimulation = await program.provider.connection.simulateTransaction( + tx, + { sigVerify: false } + ); + + if (!txSimulation.value.returnData || txSimulation.value.err) { + throw new Error( + "Could not fetch IDL version: " + + JSON.stringify( + translateError(txSimulation.value.err, parseIdlErrors(program.idl)) + ) + ); + } + + const data = encoding.b64.decode(txSimulation.value.returnData?.data[0]!); + const parsed = deserializeLayout(programVersionLayout, data); + const version = encoding.bytes.decode(parsed.version); + if (version in IdlVersions) return version as IdlVersion; + else throw new Error("Unknown IDL version: " + version); + } + + export async function createInitializeInstruction( + program: Program>, + args: { + payer: PublicKey; + owner: PublicKey; + chain: Chain; + mint: PublicKey; + outboundLimit: bigint; + tokenProgram: PublicKey; + mode: "burning" | "locking"; + }, + pdas?: Pdas + ) { + const mode: any = + args.mode === "burning" ? { burning: {} } : { locking: {} }; + const chainId = toChainId(args.chain); + + pdas = pdas ?? NTT.pdas(program.programId); + + const limit = new BN(args.outboundLimit.toString()); + return await program.methods + .initialize({ chainId, limit: limit, mode }) + .accountsStrict({ + payer: args.payer, + deployer: args.owner, + programData: programDataAddress(program.programId), + config: pdas.configAccount(), + mint: args.mint, + rateLimit: pdas.outboxRateLimitAccount(), + tokenProgram: args.tokenProgram, + tokenAuthority: pdas.tokenAuthority(), + custody: await NTT.custodyAccountAddress( + pdas, + args.mint, + args.tokenProgram + ), + bpfLoaderUpgradeableProgram: BPF_LOADER_UPGRADEABLE_PROGRAM_ID, + associatedTokenProgram: splToken.ASSOCIATED_TOKEN_PROGRAM_ID, + systemProgram: SystemProgram.programId, + }) + .instruction(); + } + + // This function should be called after each upgrade. If there's nothing to + // do, it won't actually submit a transaction, so it's cheap to call. + export async function initializeOrUpdateLUT( + program: Program>, + config: NttBindings.Config, + args: { + payer: PublicKey; + wormholeId: PublicKey; + }, + pdas?: Pdas + ) { + // if the program is < major version 2.x.x, we don't need to initialize the LUT + const [major, , ,] = parseVersion(program.idl.version); + if (major < 2) return; + + pdas = pdas ?? NTT.pdas(program.programId); + + // TODO: find a more robust way of fetching a recent slot + const slot = (await program.provider.connection.getSlot()) - 1; + + const [_, lutAddress] = web3.AddressLookupTableProgram.createLookupTable({ + authority: pdas.lutAuthority(), + payer: args.payer, + recentSlot: slot, + }); + + const whAccs = utils.getWormholeDerivedAccounts( + program.programId, + args.wormholeId.toString() + ); + + const entries = { + config: pdas.configAccount(), + custody: config.custody, + tokenProgram: config.tokenProgram, + mint: config.mint, + tokenAuthority: pdas.tokenAuthority(), + outboxRateLimit: pdas.outboxRateLimitAccount(), + wormhole: { + bridge: whAccs.wormholeBridge, + feeCollector: whAccs.wormholeFeeCollector, + sequence: whAccs.wormholeSequence, + program: args.wormholeId, + systemProgram: SystemProgram.programId, + clock: web3.SYSVAR_CLOCK_PUBKEY, + rent: web3.SYSVAR_RENT_PUBKEY, + }, + }; + + // collect all pubkeys in entries recursively + const collectPubkeys = (obj: any): Array => { + const pubkeys = new Array(); + for (const key in obj) { + const value = obj[key]; + if (value instanceof PublicKey) { + pubkeys.push(value); + } else if (typeof value === "object") { + pubkeys.push(...collectPubkeys(value)); + } + } + return pubkeys; + }; + const pubkeys = collectPubkeys(entries).map((pk) => pk.toBase58()); + + const existingLut: web3.AddressLookupTableAccount | null = + await getAddressLookupTable(program, pdas); + + if (existingLut !== null) { + const existingPubkeys = + existingLut.state.addresses?.map((a) => a.toBase58()) ?? []; + + // if pubkeys contains keys that are not in the existing LUT, we need to + // add them to the LUT + const missingPubkeys = pubkeys.filter( + (pk) => !existingPubkeys.includes(pk) + ); + + if (missingPubkeys.length === 0) { + return null; + } + } + + return await program.methods + .initializeLut(new BN(slot)) + .accountsStrict({ + payer: args.payer, + authority: pdas.lutAuthority(), + lutAddress, + lut: pdas.lutAccount(), + lutProgram: AddressLookupTableProgram.programId, + systemProgram: SystemProgram.programId, + entries, + }) + .instruction(); + } + + export async function createTransferBurnInstruction( + program: Program>, + config: NttBindings.Config, + args: { + payer: PublicKey; + from: PublicKey; + fromAuthority: PublicKey; + transferArgs: TransferArgs; + outboxItem: PublicKey; + }, + pdas?: Pdas + ): Promise { + pdas = pdas ?? NTT.pdas(program.programId); + + const custody = await custodyAccountAddress(pdas, config); + const recipientChain = toChain(args.transferArgs.recipientChain.id); + const transferIx = await program.methods + .transferBurn(args.transferArgs) + .accountsStrict({ + common: { + payer: args.payer, + config: { config: pdas.configAccount() }, + mint: config.mint, + from: args.from, + tokenProgram: config.tokenProgram, + outboxItem: args.outboxItem, + outboxRateLimit: pdas.outboxRateLimitAccount(), + systemProgram: SystemProgram.programId, + custody, + }, + peer: pdas.peerAccount(recipientChain), + inboxRateLimit: pdas.inboxRateLimitAccount(recipientChain), + sessionAuthority: pdas.sessionAuthority( + args.fromAuthority, + args.transferArgs + ), + tokenAuthority: pdas.tokenAuthority(), + }) + .instruction(); + + const mintInfo = await splToken.getMint( + program.provider.connection, + config.mint, + undefined, + config.tokenProgram + ); + const transferHook = splToken.getTransferHook(mintInfo); + + if (transferHook) { + const source = args.from; + const mint = config.mint; + const destination = await custodyAccountAddress(pdas, config); + const owner = pdas.sessionAuthority( + args.fromAuthority, + args.transferArgs + ); + await addExtraAccountMetasForExecute( + program.provider.connection, + transferIx, + transferHook.programId, + source, + mint, + destination, + owner, + // TODO(csongor): compute the amount that's passed into transfer. + // Leaving this 0 is fine unless the transfer hook accounts addresses + // depend on the amount (which is unlikely). + // If this turns out to be the case, the amount to put here is the + // untrimmed amount after removing dust. + 0 + ); + } + + return transferIx; + } + + /** + * Creates a transfer_lock instruction. The `payer`, `fromAuthority`, and `outboxItem` + * arguments must sign the transaction + */ + export async function createTransferLockInstruction( + program: Program>, + config: NttBindings.Config, + args: { + payer: PublicKey; + from: PublicKey; + fromAuthority: PublicKey; + transferArgs: NTT.TransferArgs; + outboxItem: PublicKey; + }, + pdas?: Pdas + ): Promise { + if (config.paused) throw new Error("Contract is paused"); + + pdas = pdas ?? NTT.pdas(program.programId); + + const chain = toChain(args.transferArgs.recipientChain.id); + const custody = await custodyAccountAddress(pdas, config); + const transferIx = await program.methods + .transferLock(args.transferArgs) + .accountsStrict({ + common: { + payer: args.payer, + config: { config: pdas.configAccount() }, + mint: config.mint, + from: args.from, + tokenProgram: config.tokenProgram, + outboxItem: args.outboxItem, + outboxRateLimit: pdas.outboxRateLimitAccount(), + custody, + systemProgram: SystemProgram.programId, + }, + peer: pdas.peerAccount(chain), + inboxRateLimit: pdas.inboxRateLimitAccount(chain), + sessionAuthority: pdas.sessionAuthority( + args.fromAuthority, + args.transferArgs + ), + custody, + }) + .instruction(); + + const mintInfo = await splToken.getMint( + program.provider.connection, + config.mint, + undefined, + config.tokenProgram + ); + const transferHook = splToken.getTransferHook(mintInfo); + + if (transferHook) { + const source = args.from; + const destination = await custodyAccountAddress(pdas, config); + const owner = pdas.sessionAuthority( + args.fromAuthority, + args.transferArgs + ); + await addExtraAccountMetasForExecute( + program.provider.connection, + transferIx, + transferHook.programId, + source, + config.mint, + destination, + owner, + // TODO(csongor): compute the amount that's passed into transfer. + // Leaving this 0 is fine unless the transfer hook accounts addresses + // depend on the amount (which is unlikely). + // If this turns out to be the case, the amount to put here is the + // untrimmed amount after removing dust. + 0 + ); + } + + return transferIx; + } + + /** + * Creates a release_outbound instruction. The `payer` needs to sign the transaction. + */ + export async function createReleaseOutboundInstruction( + program: Program>, + args: { + wormholeId: PublicKey; + payer: PublicKey; + outboxItem: PublicKey; + revertOnDelay: boolean; + }, + pdas?: Pdas + ): Promise { + pdas = pdas ?? NTT.pdas(program.programId); + + const whAccs = utils.getWormholeDerivedAccounts( + program.programId, + args.wormholeId + ); + + return await program.methods + .releaseWormholeOutbound({ + revertOnDelay: args.revertOnDelay, + }) + .accounts({ + payer: args.payer, + config: { config: pdas.configAccount() }, + outboxItem: args.outboxItem, + wormholeMessage: pdas.wormholeMessageAccount(args.outboxItem), + emitter: whAccs.wormholeEmitter, + transceiver: pdas.registeredTransceiver(program.programId), + wormhole: { + bridge: whAccs.wormholeBridge, + feeCollector: whAccs.wormholeFeeCollector, + sequence: whAccs.wormholeSequence, + program: args.wormholeId, + }, + }) + .instruction(); + } + + // TODO: document that if recipient is provided, then the instruction can be + // created before the inbox item is created (i.e. they can be put in the same tx) + export async function createReleaseInboundMintInstruction( + program: Program>, + config: NttBindings.Config, + args: { + payer: PublicKey; + chain: Chain; + nttMessage: Ntt.Message; + revertOnDelay: boolean; + recipient?: PublicKey; + }, + pdas?: Pdas + ): Promise { + pdas = pdas ?? NTT.pdas(program.programId); + + const recipientAddress = + args.recipient ?? + (await getInboxItem(program, args.chain, args.nttMessage)) + .recipientAddress; + + const transferIx = await program.methods + .releaseInboundMint({ + revertOnDelay: args.revertOnDelay, + }) + .accountsStrict({ + common: { + payer: args.payer, + config: { config: pdas.configAccount() }, + inboxItem: pdas.inboxItemAccount(args.chain, args.nttMessage), + recipient: getAssociatedTokenAddressSync( + config.mint, + recipientAddress, + true, + config.tokenProgram + ), + mint: config.mint, + tokenAuthority: pdas.tokenAuthority(), + tokenProgram: config.tokenProgram, + custody: await custodyAccountAddress(pdas, config), + }, + }) + .instruction(); + + const mintInfo = await splToken.getMint( + program.provider.connection, + config.mint, + undefined, + config.tokenProgram + ); + const transferHook = splToken.getTransferHook(mintInfo); + + if (transferHook) { + const source = await custodyAccountAddress(pdas, config); + const mint = config.mint; + const destination = getAssociatedTokenAddressSync( + mint, + recipientAddress, + true, + config.tokenProgram + ); + const owner = pdas.tokenAuthority(); + await addExtraAccountMetasForExecute( + program.provider.connection, + transferIx, + transferHook.programId, + source, + mint, + destination, + owner, + // TODO(csongor): compute the amount that's passed into transfer. + // Leaving this 0 is fine unless the transfer hook accounts addresses + // depend on the amount (which is unlikely). + // If this turns out to be the case, the amount to put here is the + // untrimmed amount after removing dust. + 0 + ); + } + + return transferIx; + } + + export async function createReleaseInboundUnlockInstruction( + program: Program>, + config: NttBindings.Config, + args: { + payer: PublicKey; + chain: Chain; + nttMessage: Ntt.Message; + revertOnDelay: boolean; + recipient?: PublicKey; + }, + pdas?: Pdas + ) { + const recipientAddress = + args.recipient ?? + (await NTT.getInboxItem(program, args.chain, args.nttMessage)) + .recipientAddress; + + pdas = pdas ?? NTT.pdas(program.programId); + const custody = await custodyAccountAddress(pdas, config); + + const transferIx = await program.methods + .releaseInboundUnlock({ + revertOnDelay: args.revertOnDelay, + }) + .accountsStrict({ + common: { + payer: args.payer, + config: { config: pdas.configAccount() }, + inboxItem: pdas.inboxItemAccount(args.chain, args.nttMessage), + recipient: getAssociatedTokenAddressSync( + config.mint, + recipientAddress, + true, + config.tokenProgram + ), + mint: config.mint, + tokenAuthority: pdas.tokenAuthority(), + tokenProgram: config.tokenProgram, + custody, + }, + custody, + }) + .instruction(); + + const mintInfo = await splToken.getMint( + program.provider.connection, + config.mint, + undefined, + config.tokenProgram + ); + const transferHook = splToken.getTransferHook(mintInfo); + + if (transferHook) { + const source = await custodyAccountAddress(pdas, config); + const mint = config.mint; + const destination = getAssociatedTokenAddressSync( + mint, + recipientAddress, + true, + config.tokenProgram + ); + const owner = pdas.tokenAuthority(); + await addExtraAccountMetasForExecute( + program.provider.connection, + transferIx, + transferHook.programId, + source, + mint, + destination, + owner, + // TODO(csongor): compute the amount that's passed into transfer. + // Leaving this 0 is fine unless the transfer hook accounts addresses + // depend on the amount (which is unlikely). + // If this turns out to be the case, the amount to put here is the + // untrimmed amount after removing dust. + 0 + ); + } + + return transferIx; + } + + export async function createSetPeerInstruction( + program: Program>, + args: { + payer: PublicKey; + owner: PublicKey; + chain: Chain; + address: ArrayLike; + limit: BN; + tokenDecimals: number; + }, + pdas?: Pdas + ) { + pdas = pdas ?? NTT.pdas(program.programId); + return await program.methods + .setPeer({ + chainId: { id: toChainId(args.chain) }, + address: Array.from(args.address), + limit: args.limit, + tokenDecimals: args.tokenDecimals, + }) + .accounts({ + payer: args.payer, + owner: args.owner, + config: pdas.configAccount(), + peer: pdas.peerAccount(args.chain), + inboxRateLimit: pdas.inboxRateLimitAccount(args.chain), + }) + .instruction(); + } + + export async function setWormholeTransceiverPeer( + program: Program>, + args: { + wormholeId: PublicKey; + payer: PublicKey; + owner: PublicKey; + chain: Chain; + address: ArrayLike; + }, + pdas?: Pdas + ) { + pdas = pdas ?? NTT.pdas(program.programId); + const ix = await program.methods + .setWormholePeer({ + chainId: { id: toChainId(args.chain) }, + address: Array.from(args.address), + }) + .accounts({ + payer: args.payer, + owner: args.owner, + config: pdas.configAccount(), + peer: pdas.transceiverPeerAccount(args.chain), + }) + .instruction(); + + const wormholeMessage = Keypair.generate(); + const whAccs = utils.getWormholeDerivedAccounts( + program.programId, + args.wormholeId + ); + + const broadcastIx = await program.methods + .broadcastWormholePeer({ chainId: toChainId(args.chain) }) + .accounts({ + payer: args.payer, + config: pdas.configAccount(), + peer: pdas.transceiverPeerAccount(args.chain), + wormholeMessage: wormholeMessage.publicKey, + emitter: pdas.emitterAccount(), + wormhole: { + bridge: whAccs.wormholeBridge, + feeCollector: whAccs.wormholeFeeCollector, + sequence: whAccs.wormholeSequence, + program: args.wormholeId, + }, + }) + .instruction(); + + const transaction = new Transaction().add(ix, broadcastIx); + transaction.feePayer = args.payer; + return { + transaction, + signers: [wormholeMessage], + } as SolanaTransaction; + } + + export async function registerTransceiver( + program: Program>, + config: NttBindings.Config, + args: { + wormholeId: PublicKey; + payer: PublicKey; + owner: PublicKey; + transceiver: PublicKey; + }, + pdas?: Pdas + ) { + pdas = pdas ?? NTT.pdas(program.programId); + const ix = await program.methods + .registerTransceiver() + .accounts({ + payer: args.payer, + owner: args.owner, + config: pdas.configAccount(), + transceiver: args.transceiver, + registeredTransceiver: pdas.registeredTransceiver(args.transceiver), + }) + .instruction(); + + const wormholeMessage = Keypair.generate(); + const whAccs = utils.getWormholeDerivedAccounts( + program.programId, + args.wormholeId + ); + const broadcastIx = await program.methods + .broadcastWormholeId() + .accounts({ + payer: args.payer, + config: pdas.configAccount(), + mint: config.mint, + wormholeMessage: wormholeMessage.publicKey, + emitter: pdas.emitterAccount(), + wormhole: { + bridge: whAccs.wormholeBridge, + feeCollector: whAccs.wormholeFeeCollector, + sequence: whAccs.wormholeSequence, + program: args.wormholeId, + }, + }) + .instruction(); + + const transaction = new Transaction().add(ix, broadcastIx); + transaction.feePayer = args.payer; + return { + transaction, + signers: [wormholeMessage], + }; + } + + export async function createSetOuboundLimitInstruction( + program: Program>, + args: { + owner: PublicKey; + chain: Chain; + limit: BN; + }, + pdas?: Pdas + ) { + pdas = pdas ?? NTT.pdas(program.programId); + return await program.methods + .setOutboundLimit({ + limit: args.limit, + }) + .accounts({ + owner: args.owner, + config: pdas.configAccount(), + rateLimit: pdas.outboxRateLimitAccount(), + }) + .instruction(); + } + + export async function setInboundLimit( + program: Program>, + args: { + owner: PublicKey; + chain: Chain; + limit: BN; + }, + pdas?: Pdas + ) { + pdas = pdas ?? NTT.pdas(program.programId); + return await program.methods + .setInboundLimit({ + chainId: { id: toChainId(args.chain) }, + limit: args.limit, + }) + .accounts({ + owner: args.owner, + config: pdas.configAccount(), + rateLimit: pdas.inboxRateLimitAccount(args.chain), + }) + .instruction(); + } + + export async function createReceiveWormholeMessageInstruction( + program: Program>, + args: { + wormholeId: PublicKey; + payer: PublicKey; + vaa: VAA<"Ntt:WormholeTransfer">; + }, + pdas?: Pdas + ): Promise { + pdas = pdas ?? NTT.pdas(program.programId); + + const wormholeNTT = args.vaa; + const nttMessage = wormholeNTT.payload.nttManagerPayload; + const chain = wormholeNTT.emitterChain; + + const transceiverPeer = pdas.transceiverPeerAccount(chain); + + return await program.methods + .receiveWormholeMessage() + .accounts({ + payer: args.payer, + config: { config: pdas.configAccount() }, + peer: transceiverPeer, + vaa: utils.derivePostedVaaKey( + args.wormholeId, + Buffer.from(wormholeNTT.hash) + ), + transceiverMessage: pdas.transceiverMessageAccount( + chain, + nttMessage.id + ), + }) + .instruction(); + } + export async function createRedeemInstruction( + program: Program>, + config: NttBindings.Config, + args: { + payer: PublicKey; + vaa: VAA<"Ntt:WormholeTransfer">; + }, + pdas?: Pdas + ): Promise { + pdas = pdas ?? NTT.pdas(program.programId); + + const wormholeNTT = args.vaa; + const nttMessage = wormholeNTT.payload.nttManagerPayload; + const chain = wormholeNTT.emitterChain; + + return await program.methods + .redeem({}) + .accounts({ + payer: args.payer, + config: pdas.configAccount(), + peer: pdas.peerAccount(chain), + transceiverMessage: pdas.transceiverMessageAccount( + chain, + nttMessage.id + ), + transceiver: pdas.registeredTransceiver(program.programId), + mint: config.mint, + inboxItem: pdas.inboxItemAccount(chain, nttMessage), + inboxRateLimit: pdas.inboxRateLimitAccount(chain), + outboxRateLimit: pdas.outboxRateLimitAccount(), + }) + .instruction(); + } + + // Account access + + /** + * Fetches the Config account from the contract. + * + * @param config If provided, the config is just returned without making a + * network request. This is handy in case multiple config + * accessor functions are used, the config can just be queried + * once and passed around. + */ + export async function getConfig( + program: Program>, + pdas: Pdas + ): Promise> { + return await program.account.config.fetch(pdas.configAccount()); + } + + export async function getInboxItem( + program: Program>, + fromChain: Chain, + nttMessage: Ntt.Message + ): Promise> { + return await program.account.inboxItem.fetch( + NTT.pdas(program.programId).inboxItemAccount(fromChain, nttMessage) + ); + } + + export async function getAddressLookupTable( + program: Program>, + pdas?: Pdas + ): Promise { + const [major, , ,] = parseVersion(program.idl.version); + if (major < 2) return null; + + pdas = pdas ?? NTT.pdas(program.programId); + const lut = await program.account.lut.fetchNullable(pdas.lutAccount()); + if (!lut) return null; + + const response = await program.provider.connection.getAddressLookupTable( + lut.address + ); + if (response.value === null) throw new Error("Could not fetch LUT"); + return response.value; + } + + /** + * Returns the address of the custody account. If the config is available + * (i.e. the program is initialised), the mint is derived from the config. + * Otherwise, the mint must be provided. + */ + export async function custodyAccountAddress( + pdas: Pdas, + configOrMint: NttBindings.Config | PublicKey, + tokenProgram = splToken.TOKEN_PROGRAM_ID + ): Promise { + if (configOrMint instanceof PublicKey) { + return splToken.getAssociatedTokenAddress( + configOrMint, + pdas.tokenAuthority(), + true, + tokenProgram + ); + } else { + return splToken.getAssociatedTokenAddress( + configOrMint.mint, + pdas.tokenAuthority(), + true, + configOrMint.tokenProgram + ); + } + } +} + +/** + * TODO: this is copied from @solana/spl-token, because the most recent released + * version (0.4.3) is broken (does object equality instead of structural on the pubkey) + * + * this version fixes that error, looks like it's also fixed on main: + * https://github.com/solana-labs/solana-program-library/blob/ad4eb6914c5e4288ad845f29f0003cd3b16243e7/token/js/src/extensions/transferHook/instructions.ts#L208 + */ +async function addExtraAccountMetasForExecute( + connection: Connection, + instruction: TransactionInstruction, + programId: PublicKey, + source: PublicKey, + mint: PublicKey, + destination: PublicKey, + owner: PublicKey, + amount: number | bigint, + commitment?: Commitment +) { + const validateStatePubkey = splToken.getExtraAccountMetaAddress( + mint, + programId + ); + const validateStateAccount = await connection.getAccountInfo( + validateStatePubkey, + commitment + ); + if (validateStateAccount == null) { + return instruction; + } + const validateStateData = splToken.getExtraAccountMetas(validateStateAccount); + + // Check to make sure the provided keys are in the instruction + if ( + ![source, mint, destination, owner].every((key) => + instruction.keys.some((meta) => meta.pubkey.equals(key)) + ) + ) { + throw new Error("Missing required account in instruction"); + } + + const executeInstruction = splToken.createExecuteInstruction( + programId, + source, + mint, + destination, + owner, + validateStatePubkey, + BigInt(amount) + ); + + for (const extraAccountMeta of validateStateData) { + executeInstruction.keys.push( + deEscalateAccountMeta( + await splToken.resolveExtraAccountMeta( + connection, + extraAccountMeta, + executeInstruction.keys, + executeInstruction.data, + executeInstruction.programId + ), + executeInstruction.keys + ) + ); + } + + // Add only the extra accounts resolved from the validation state + instruction.keys.push(...executeInstruction.keys.slice(5)); + + // Add the transfer hook program ID and the validation state account + instruction.keys.push({ + pubkey: programId, + isSigner: false, + isWritable: false, + }); + instruction.keys.push({ + pubkey: validateStatePubkey, + isSigner: false, + isWritable: false, + }); +} + +// TODO: delete (see above) +function deEscalateAccountMeta( + accountMeta: AccountMeta, + accountMetas: AccountMeta[] +): AccountMeta { + const maybeHighestPrivileges = accountMetas + .filter((x) => x.pubkey.equals(accountMeta.pubkey)) + .reduce<{ isSigner: boolean; isWritable: boolean } | undefined>( + (acc, x) => { + if (!acc) return { isSigner: x.isSigner, isWritable: x.isWritable }; + return { + isSigner: acc.isSigner || x.isSigner, + isWritable: acc.isWritable || x.isWritable, + }; + }, + undefined + ); + if (maybeHighestPrivileges) { + const { isSigner, isWritable } = maybeHighestPrivileges; + if (!isSigner && isSigner !== accountMeta.isSigner) { + accountMeta.isSigner = false; + } + if (!isWritable && isWritable !== accountMeta.isWritable) { + accountMeta.isWritable = false; + } + } + return accountMeta; +} diff --git a/solana/ts/lib/quoter.ts b/solana/ts/lib/quoter.ts new file mode 100644 index 000000000..b90413933 --- /dev/null +++ b/solana/ts/lib/quoter.ts @@ -0,0 +1,432 @@ +import { Program } from "@coral-xyz/anchor"; +import { + Connection, + LAMPORTS_PER_SOL, + PublicKey, + PublicKeyInitData, + SystemProgram, +} from "@solana/web3.js"; +import { amount, chainToPlatform } from "@wormhole-foundation/sdk"; +import { + Chain, + deserializeLayout, + toChainId, +} from "@wormhole-foundation/sdk-base"; +import IDL from "../idl/2_0_0/json/ntt_quoter.json"; +import { NttQuoter as Idl } from "../idl/2_0_0/ts/ntt_quoter.js"; +import { + U64, + chainToBytes, + derivePda, + programDataAddress, + programDataLayout, + quoterAddresses, +} from "./utils.js"; + +//constants that must match ntt-quoter lib.rs / implementation: +const USD_UNIT = 1e6; +const GWEI_PER_ETH = 1e9; +export const WEI_PER_GWEI = 1e9; + +const SEED_PREFIX_INSTANCE = "instance"; +const SEED_PREFIX_REGISTERED_CHAIN = "registered_chain"; +const SEED_PREFIX_REGISTERED_NTT = "registered_ntt"; +const SEED_PREFIX_RELAY_REQUEST = "relay_request"; + +export class NttQuoter { + readonly instance: PublicKey; + private readonly program: Program; + nttProgramId: PublicKey; + pdas: ReturnType; + + constructor( + connection: Connection, + programId: PublicKeyInitData, + nttProgramId: PublicKeyInitData + ) { + // @ts-ignore + this.program = new Program(IDL as Idl, new PublicKey(programId), { + connection, + }); + this.nttProgramId = new PublicKey(nttProgramId); + this.pdas = quoterAddresses(this.program.programId); + this.instance = derivePda([SEED_PREFIX_INSTANCE], this.program.programId); + } + + // ---- user relevant functions ---- + + async isRelayEnabled(destination: Chain) { + try { + const { paused } = await this.getRegisteredChain(destination); + return !paused; + } catch (e: any) { + if (e.message?.includes("Account does not exist")) { + return false; + } + throw e; + } + } + + async calcRelayCostInSol( + nttProgramId: PublicKey, + chain: Chain, + requestedGasDropoffEth: number + ) { + const [chainData, nttData, instanceData, rentCost] = await Promise.all([ + this.getRegisteredChain(chain), + this.getRegisteredNtt(nttProgramId), + this.getInstance(), + this.program.provider.connection.getMinimumBalanceForRentExemption( + this.program.account.relayRequest.size + ), + ]); + + if (requestedGasDropoffEth > chainData.maxGasDropoffEth) + throw new Error("Requested gas dropoff exceeds allowed maximum"); + + const totalNativeGasCostUsd = + chainData.nativePriceUsd * + (requestedGasDropoffEth + + (chainData.gasPriceGwei * nttData.gasCost) / GWEI_PER_ETH); + + const totalCostSol = + rentCost / LAMPORTS_PER_SOL + + (chainData.basePriceUsd + totalNativeGasCostUsd) / + instanceData.solPriceUsd; + + return totalCostSol; + } + + /** + * Estimate the cost of a relay request + * @param chain The destination chain + * @param gasDropoff The amount of native gas to end up with on the destination chain + * @returns The estimated cost in lamports + */ + async quoteDeliveryPrice(chain: Chain, gasDropoff?: bigint) { + if (chainToPlatform(chain) !== "Evm") + throw new Error("Only EVM chains are supported"); + + // Convert to decimal number since we're multiplying other numbers + const gasDropoffEth = amount.whole( + amount.fromBaseUnits(gasDropoff ?? 0n, 18) + ); + + const [chainData, instanceData, nttData, rentCost] = await Promise.all([ + this.getRegisteredChain(chain), + this.getInstance(), + this.getRegisteredNtt(this.nttProgramId), + this.program.provider.connection.getMinimumBalanceForRentExemption( + this.program.account.relayRequest.size + ), + ]); + + if (chainData.nativePriceUsd === 0) throw new Error("Native price is 0"); + if (instanceData.solPriceUsd === 0) throw new Error("SOL price is 0"); + if (gasDropoffEth > chainData.maxGasDropoffEth) + throw new Error("Requested gas dropoff exceeds allowed maximum"); + + const totalNativeGasCostUsd = + chainData.nativePriceUsd * + (gasDropoffEth + + (chainData.gasPriceGwei * nttData.gasCost) / GWEI_PER_ETH); + + const totalCostSol = + rentCost / LAMPORTS_PER_SOL + + (chainData.basePriceUsd + totalNativeGasCostUsd) / + instanceData.solPriceUsd; + + // Add 5% to account for possible price updates while the tx is in flight + return BigInt(U64.to(totalCostSol * 1.05, LAMPORTS_PER_SOL).toString()); + } + + async createRequestRelayInstruction( + payer: PublicKey, + outboxItem: PublicKey, + chain: Chain, + maxFeeSol: number, + gasDropoffEth: number + ) { + return this.program.methods + .requestRelay({ + maxFee: U64.to(maxFeeSol, LAMPORTS_PER_SOL), + gasDropoff: U64.to(gasDropoffEth, GWEI_PER_ETH), + }) + .accountsStrict({ + payer, + instance: this.instance, + registeredChain: this.registeredChainPda(chain), + outboxItem, + relayRequest: this.relayRequestPda(outboxItem), + systemProgram: SystemProgram.programId, + registeredNtt: this.pdas.registeredNttAccount(this.nttProgramId), + }) + .instruction(); + } + + // ---- admin/assistant (=authority) relevant functions ---- + + async getInstance() { + const data = await this.program.account.instance.fetch(this.instance); + return { + owner: data.owner, + assistant: data.assistant, + feeRecipient: data.feeRecipient, + solPriceUsd: U64.from(data.solPrice, USD_UNIT), + }; + } + + async getRegisteredChain(chain: Chain) { + const data = await this.program.account.registeredChain.fetch( + this.registeredChainPda(chain) + ); + + return { + paused: data.basePrice.eq(U64.MAX), + maxGasDropoffEth: U64.from(data.maxGasDropoff, GWEI_PER_ETH), + basePriceUsd: U64.from(data.basePrice, USD_UNIT), + nativePriceUsd: U64.from(data.nativePrice, USD_UNIT), + gasPriceGwei: U64.from(data.gasPrice, WEI_PER_GWEI), + }; + } + + async getRegisteredNtt(nttProgramId: PublicKey) { + const data = await this.program.account.registeredNtt.fetch( + this.registeredNttPda(nttProgramId) + ); + + return { + gasCost: data.gasCost, + wormholeTransceiverIndex: data.wormholeTransceiverIndex, + }; + } + + //returns null if no relay was requested, otherwise it the requested gas dropoff (in eth), + // which can be 0, so a strict === null check is required! + async wasRelayRequested(outboxItem: PublicKey) { + const relayRequest = await this.program.account.relayRequest.fetchNullable( + this.relayRequestPda(outboxItem) + ); + + return relayRequest + ? U64.from(relayRequest.requestedGasDropoff, GWEI_PER_ETH) + : null; + } + + async createInitalizeInstruction(feeRecipient: PublicKey) { + if (!this.program.account.instance.fetchNullable(this.instance)) + throw new Error("Already initialized"); + + const programData = programDataAddress(this.program.programId); + + const accInfo = await this.program.provider.connection.getAccountInfo( + programData + ); + if (!accInfo) throw new Error("Could not find program data account"); + + const deserProgramData = deserializeLayout(programDataLayout, accInfo.data); + if (!deserProgramData.upgradeAuthority.isSome) + throw new Error("Could not determine program owner from program data."); + + return this.program.methods + .initialize() + .accounts({ + owner: deserProgramData.upgradeAuthority.value, + instance: this.instance, + feeRecipient, + programData, + systemProgram: SystemProgram.programId, + }) + .instruction(); + } + + async createSetAssistantInstruction(assistant: PublicKey) { + const { owner, assistant: currentAssistant } = await this.getInstance(); + if (currentAssistant.equals(assistant)) + throw new Error("Is already assistant"); + + return this.program.methods + .setAssistant() + .accounts({ + owner, + instance: this.instance, + assistant, + }) + .instruction(); + } + + async createSetFeeRecipientInstruction(feeRecipient: PublicKey) { + if (feeRecipient.equals(PublicKey.default)) + throw new Error("Fee recipient cannot be default public key"); + + const { owner, feeRecipient: currentFeeRecipient } = + await this.getInstance(); + if (currentFeeRecipient.equals(feeRecipient)) + throw new Error("Is already feeRecipient"); + + return this.program.methods + .setFeeRecipient() + .accounts({ + owner, + instance: this.instance, + feeRecipient, + }) + .instruction(); + } + + async createRegisterChainInstruction(authority: PublicKey, chain: Chain) { + const chainId = toChainId(chain); + return this.program.methods + .registerChain({ chainId }) + .accounts({ + authority, + instance: this.instance, + registeredChain: this.registeredChainPda(chain), + systemProgram: SystemProgram.programId, + }) + .instruction(); + } + + async createRegisterNttInstruction( + authority: PublicKey, + nttProgramId: PublicKey, + gasCost: number, + wormholeTransceiverIndex: number + ) { + return this.program.methods + .registerNtt({ + nttProgramId, + gasCost, + wormholeTransceiverIndex, + }) + .accounts({ + authority, + instance: this.instance, + registeredNtt: this.registeredNttPda(nttProgramId), + systemProgram: SystemProgram.programId, + }) + .instruction(); + } + + async createDeregisterNttInstruction( + authority: PublicKey, + nttProgramId: PublicKey + ) { + return this.program.methods + .deregisterNtt({ nttProgramId }) + .accounts({ + authority, + instance: this.instance, + registeredNtt: this.registeredNttPda(nttProgramId), + systemProgram: SystemProgram.programId, + }) + .instruction(); + } + + async createUpdateSolPriceInstruction( + authority: PublicKey, + solPriceUsd: number + ) { + return this.program.methods + .updateSolPrice({ + solPrice: U64.to(solPriceUsd, USD_UNIT), + }) + .accounts({ + authority, + instance: this.instance, + }) + .instruction(); + } + + async createUpdateChainParamsInstruction( + authority: PublicKey, + chain: Chain, + maxGasDropoffEth: number, + basePriceUsd: number + ) { + return this.program.methods + .updateChainParams({ + maxGasDropoff: U64.to(maxGasDropoffEth, GWEI_PER_ETH), + basePrice: U64.to(basePriceUsd, USD_UNIT), + }) + .accounts({ + authority, + instance: this.instance, + registeredChain: this.registeredChainPda(chain), + }) + .instruction(); + } + + async createPauseRelayForChainInstruction( + authority: PublicKey, + chain: Chain + ) { + return this.program.methods + .updateChainParams({ + maxGasDropoff: U64.to(0, 1), + basePrice: U64.MAX, + }) + .accounts({ + authority, + instance: this.instance, + registeredChain: this.registeredChainPda(chain), + }) + .instruction(); + } + + async createUpdateChainPricesInstruction( + authority: PublicKey, + chain: Chain, + nativePriceUsd: number, + gasPriceGwei: number + ) { + return this.program.methods + .updateChainPrices({ + nativePrice: U64.to(nativePriceUsd, USD_UNIT), + gasPrice: U64.to(gasPriceGwei, WEI_PER_GWEI), + }) + .accounts({ + authority, + instance: this.instance, + registeredChain: this.registeredChainPda(chain), + }) + .instruction(); + } + + async createCloseRelayInstruction( + authority: PublicKey, + outboxItem: PublicKey + ) { + return this.program.methods + .closeRelay() + .accounts({ + authority, + instance: this.instance, + relayRequest: this.relayRequestPda(outboxItem), + }) + .instruction(); + } + + // ---- private ---- + + private registeredChainPda(chainId: Chain) { + return derivePda( + [SEED_PREFIX_REGISTERED_CHAIN, chainToBytes(chainId)], + this.program.programId + ); + } + + private registeredNttPda(nttProgramId: PublicKey) { + return derivePda( + [SEED_PREFIX_REGISTERED_NTT, nttProgramId.toBytes()], + this.program.programId + ); + } + + private relayRequestPda(outboxItem: PublicKey) { + return derivePda( + [SEED_PREFIX_RELAY_REQUEST, outboxItem.toBytes()], + this.program.programId + ); + } +} diff --git a/sdk/solana/src/utils.ts b/solana/ts/lib/utils.ts similarity index 51% rename from sdk/solana/src/utils.ts rename to solana/ts/lib/utils.ts index 0e659e6bc..3d20847bd 100644 --- a/sdk/solana/src/utils.ts +++ b/solana/ts/lib/utils.ts @@ -1,16 +1,11 @@ -import { PublicKey, PublicKeyInitData } from "@solana/web3.js"; import { - Chain, - ChainId, CustomConversion, Layout, encoding, - keccak256, - toChainId, - ChainAddress, -} from "@wormhole-foundation/sdk-connect"; -import { Ntt } from "@wormhole-foundation/sdk-definitions-ntt"; -import BN from "bn.js"; +} from "@wormhole-foundation/sdk-base"; +import { BN } from "@coral-xyz/anchor"; +import { PublicKey, PublicKeyInitData } from "@solana/web3.js"; +import { Chain, ChainId, toChainId } from "@wormhole-foundation/sdk-connect"; export const BPF_LOADER_UPGRADEABLE_PROGRAM_ID = new PublicKey( "BPFLoaderUpgradeab1e11111111111111111111111" @@ -23,6 +18,22 @@ export function programDataAddress(programId: PublicKeyInitData) { )[0]; } +export function parseVersion( + version: string +): [number, number, number, string] { + const components = version.split("."); + if (components.length < 3) throw new Error("Invalid version string"); + const patchVersion = components[2]!; + const patchNumber = patchVersion.split(/[^0-9]/)[0]!; + const patchLabel = patchVersion.slice(patchNumber.length); + return [ + Number(components[0]), + Number(components[1]), + Number(patchNumber), + patchLabel, + ]; +} + export const pubKeyConversion = { to: (encoded: Uint8Array) => new PublicKey(encoded), from: (decoded: PublicKey) => decoded.toBytes(), @@ -52,7 +63,6 @@ export const programDataLayout = [ ], }, ] as const satisfies Layout; - export const programVersionLayout = [ { name: "length", binary: "uint", endianness: "little", size: 4 }, { name: "version", binary: "bytes" }, @@ -62,19 +72,16 @@ export const U64 = { MAX: new BN((2n ** 64n - 1n).toString()), to: (amount: number, unit: number) => { const ret = new BN(Math.round(amount * unit)); + if (ret.isNeg()) throw new Error("Value negative"); + if (ret.bitLength() > 64) throw new Error("Value too large"); + return ret; }, from: (amount: BN, unit: number) => amount.toNumber() / unit, }; -export interface TransferArgs { - amount: bigint; - recipient: ChainAddress; - shouldQueue: boolean; -} - type Seed = Uint8Array | string; export function derivePda( seeds: Seed | readonly Seed[], @@ -88,67 +95,9 @@ export function derivePda( )[0]; } -const chainToBytes = (chain: Chain | ChainId) => +export const chainToBytes = (chain: Chain | ChainId) => encoding.bignum.toBytes(toChainId(chain), 2); -export const nttAddresses = (programId: PublicKeyInitData) => { - const configAccount = (): PublicKey => derivePda("config", programId); - const emitterAccount = (): PublicKey => derivePda("emitter", programId); - const inboxRateLimitAccount = (chain: Chain): PublicKey => - derivePda(["inbox_rate_limit", chainToBytes(chain)], programId); - const inboxItemAccount = (chain: Chain, nttMessage: Ntt.Message): PublicKey => - derivePda(["inbox_item", Ntt.messageDigest(chain, nttMessage)], programId); - const outboxRateLimitAccount = (): PublicKey => - derivePda("outbox_rate_limit", programId); - const tokenAuthority = (): PublicKey => - derivePda("token_authority", programId); - const peerAccount = (chain: Chain): PublicKey => - derivePda(["peer", chainToBytes(chain)], programId); - const transceiverPeerAccount = (chain: Chain): PublicKey => - derivePda(["transceiver_peer", chainToBytes(chain)], programId); - const registeredTransceiver = (transceiver: PublicKey): PublicKey => - derivePda(["registered_transceiver", transceiver.toBytes()], programId); - const transceiverMessageAccount = (chain: Chain, id: Uint8Array): PublicKey => - derivePda(["transceiver_message", chainToBytes(chain), id], programId); - const wormholeMessageAccount = (outboxItem: PublicKey): PublicKey => - derivePda(["message", outboxItem.toBytes()], programId); - const lutAccount = (): PublicKey => derivePda("lut", programId); - const lutAuthority = (): PublicKey => derivePda("lut_authority", programId); - const sessionAuthority = (sender: PublicKey, args: TransferArgs): PublicKey => - derivePda( - [ - "session_authority", - sender.toBytes(), - keccak256( - encoding.bytes.concat( - encoding.bignum.toBytes(args.amount, 8), - chainToBytes(args.recipient.chain), - args.recipient.address.toUniversalAddress().toUint8Array(), - new Uint8Array([args.shouldQueue ? 1 : 0]) - ) - ), - ], - programId - ); - - return { - configAccount, - outboxRateLimitAccount, - inboxRateLimitAccount, - inboxItemAccount, - sessionAuthority, - tokenAuthority, - emitterAccount, - wormholeMessageAccount, - peerAccount, - transceiverPeerAccount, - transceiverMessageAccount, - registeredTransceiver, - lutAccount, - lutAuthority, - }; -}; - export const quoterAddresses = (programId: PublicKeyInitData) => { const instanceAccount = () => derivePda("instance", programId); const registeredNttAccount = (nttProgramId: PublicKey) => diff --git a/solana/ts/scripts/setUpTestnet.ts b/solana/ts/scripts/setUpTestnet.ts index 0539c835f..255d1395a 100644 --- a/solana/ts/scripts/setUpTestnet.ts +++ b/solana/ts/scripts/setUpTestnet.ts @@ -1,6 +1,6 @@ import { Connection, Keypair, PublicKey } from "@solana/web3.js"; import "dotenv/config"; -import { NTT } from "../sdk"; +import { NTT } from "../lib"; import { BN } from "@coral-xyz/anchor"; main(); diff --git a/solana/ts/sdk/index.ts b/solana/ts/sdk/index.ts index 2986a2d41..3622eb720 100644 --- a/solana/ts/sdk/index.ts +++ b/solana/ts/sdk/index.ts @@ -1,2 +1,8 @@ -export * from "./ntt"; -export * from "./quoter"; \ No newline at end of file +import { registerProtocol } from "@wormhole-foundation/sdk-connect"; +import { _platform } from "@wormhole-foundation/sdk-solana"; +import { SolanaNtt } from "./ntt.js"; +import "@wormhole-foundation/sdk-definitions-ntt"; + +registerProtocol(_platform, "Ntt", SolanaNtt); + +export * from "./ntt.js"; diff --git a/solana/ts/sdk/ntt.ts b/solana/ts/sdk/ntt.ts index 741815696..524531c2f 100644 --- a/solana/ts/sdk/ntt.ts +++ b/solana/ts/sdk/ntt.ts @@ -1,1254 +1,667 @@ -import { type ChainName, toChainId, coalesceChainId, type ChainId, type SignedVaa } from '@certusone/wormhole-sdk' -import { serializeLayout, toChainId as SDKv2toChainId } from '@wormhole-foundation/sdk-base' +import { Program, web3 } from "@coral-xyz/anchor"; +import * as splToken from "@solana/spl-token"; +import { createAssociatedTokenAccountInstruction } from "@solana/spl-token"; import { - deserialize, -} from '@wormhole-foundation/sdk-definitions' - -import { - type NttManagerMessage, - nttManagerMessageLayout, - nativeTokenTransferLayout -} from './nttLayout' -import { derivePostedVaaKey, getWormholeDerivedAccounts } from '@certusone/wormhole-sdk/lib/cjs/solana/wormhole' -import { BN, translateError, type IdlAccounts, Program, web3, } from '@coral-xyz/anchor' -import { getAssociatedTokenAddressSync } from '@solana/spl-token' -import { - PublicKey, Keypair, - type TransactionInstruction, - Transaction, - sendAndConfirmTransaction, - type TransactionSignature, - type Connection, + AddressLookupTableAccount, + Connection, + Keypair, + PublicKey, SystemProgram, + Transaction, TransactionMessage, VersionedTransaction, - Commitment, - AccountMeta, - AddressLookupTableProgram, - AddressLookupTableAccount -} from '@solana/web3.js' -import { Keccak } from 'sha3' -import { type ExampleNativeTokenTransfers as RawExampleNativeTokenTransfers } from '../../idl/ts/example_native_token_transfers' -import { BPF_LOADER_UPGRADEABLE_PROGRAM_ID, programDataAddress, chainIdToBeBytes, derivePda } from './utils' -import * as splToken from '@solana/spl-token'; -import IDL from '../../idl/json/example_native_token_transfers.json'; - -export * from './utils/wormhole' - -export const nttMessageLayout = nttManagerMessageLayout(nativeTokenTransferLayout); -export type NttMessage = NttManagerMessage; - -// This is a workaround for the fact that the anchor idl doesn't support generics -// yet. This type is used to remove the generics from the idl types. -type OmitGenerics = { - [P in keyof T]: T[P] extends Record<"generics", any> - ? never - : T[P] extends object - ? OmitGenerics - : T[P]; -}; - -export type ExampleNativeTokenTransfers = OmitGenerics - -export type Config = IdlAccounts['config'] -export type InboxItem = IdlAccounts['inboxItem'] - -export interface TransferArgs { - amount: BN - recipientChain: { id: ChainId } - recipientAddress: number[] - shouldQueue: boolean -} - -export const NTT_PROGRAM_IDS = [ - "nttiK1SepaQt6sZ4WGW5whvc9tEnGXGxuKeptcQPCcS", - "NTTManager111111111111111111111111111111111", - "NTTManager222222222222222222222222222222222", -] as const; - -export const WORMHOLE_PROGRAM_IDS = [ - "worm2ZoG2kUd4vFXhvjh93UUH596ayRfgQ2MgjNMTth", // mainnet - "3u8hJUVTA4jH1wYAyUur7FFZVQ8H635K3tSHHF4ssjQ5", // testnet - "Bridge1p5gheXUvJ6jGWGeCsgPKgnE3YgdGKRVCMY9o", // tilt -] as const; - -export type NttProgramId = (typeof NTT_PROGRAM_IDS)[number]; -export type WormholeProgramId = (typeof WORMHOLE_PROGRAM_IDS)[number]; - -export class NTT { - readonly program: Program - readonly wormholeId: PublicKey - // mapping from error code to error message. Used for prettifying error messages - private readonly errors: Map - addressLookupTable: web3.AddressLookupTableAccount | null = null - - constructor(connection: Connection, args: { nttId: NttProgramId, wormholeId: WormholeProgramId }) { - // TODO: initialise a new Program here with a passed in Connection - this.program = new Program(IDL as any, new PublicKey(args.nttId), { connection }); - this.wormholeId = new PublicKey(args.wormholeId) - this.errors = this.processErrors() - } - - // The `translateError` function expects this format, but the idl gives us a - // different one, so we preprocess the idl and store the expected format. - // NOTE: I'm sure there's a function within anchor that does this, but I - // couldn't find it. - private processErrors(): Map { - const errors = this.program.idl.errors - const result: Map = new Map() - errors.forEach(entry => result.set(entry.code, entry.msg)) - return result - } +} from "@solana/web3.js"; +import { + AccountAddress, + Chain, + ChainAddress, + ChainsConfig, + Contracts, + NativeAddress, + Network, + TokenAddress, + UnsignedTransaction, +} from "@wormhole-foundation/sdk-connect"; +import { + Ntt, + WormholeNttTransceiver, +} from "@wormhole-foundation/sdk-definitions-ntt"; +import { + SolanaAddress, + SolanaChains, + SolanaPlatform, + SolanaPlatformType, + SolanaTransaction, + SolanaUnsignedTransaction, +} from "@wormhole-foundation/sdk-solana"; +import { + SolanaWormholeCore, + utils, +} from "@wormhole-foundation/sdk-solana-core"; +import BN from "bn.js"; +import { NTT, NttQuoter, WEI_PER_GWEI } from "../lib/index.js"; + +import { IdlVersion, NttBindings, getNttProgram } from "../lib/bindings.js"; + +export class SolanaNtt + implements Ntt +{ + core: SolanaWormholeCore; + pdas: NTT.Pdas; + + program: Program>; + + config?: NttBindings.Config; + quoter?: NttQuoter; + addressLookupTable?: AddressLookupTableAccount; + + constructor( + readonly network: N, + readonly chain: C, + readonly connection: Connection, + readonly contracts: Contracts & { ntt?: Ntt.Contracts }, + readonly version: string = "2.0.0" + ) { + if (!contracts.ntt) throw new Error("Ntt contracts not found"); + + this.program = getNttProgram( + connection, + contracts.ntt.manager, + version as IdlVersion + ); - // Account addresses + if (this.contracts.ntt?.quoter) + this.quoter = new NttQuoter( + connection, + this.contracts.ntt.quoter!, + this.contracts.ntt.manager + ); - private derivePda(seeds: Parameters[0]): PublicKey { - return derivePda(seeds, this.program.programId) + this.core = new SolanaWormholeCore( + network, + chain, + connection, + contracts + ); + this.pdas = NTT.pdas(this.program.programId); } - configAccountAddress(): PublicKey { - return this.derivePda('config') + async isRelayingAvailable(destination: Chain): Promise { + if (!this.quoter) return false; + return await this.quoter.isRelayEnabled(destination); } - lutAccountAddress(): PublicKey { - return this.derivePda('lut') - } + async quoteDeliveryPrice( + destination: Chain, + options: Ntt.TransferOptions + ): Promise { + if (!this.quoter) throw new Error("Quoter not available"); + if (!this.quoter.isRelayEnabled(destination)) + throw new Error("Relay not enabled"); - lutAuthorityAddress(): PublicKey { - return this.derivePda('lut_authority') + return await this.quoter.quoteDeliveryPrice( + destination, + options.gasDropoff + ); } - outboxRateLimitAccountAddress(): PublicKey { - return this.derivePda('outbox_rate_limit') - } + static async fromRpc( + provider: Connection, + config: ChainsConfig + ): Promise> { + const [network, chain] = await SolanaPlatform.chainFromRpc(provider); + const conf = config[chain]!; - inboxRateLimitAccountAddress(chain: ChainName | ChainId): PublicKey { - const chainId = coalesceChainId(chain) - return this.derivePda(['inbox_rate_limit', chainIdToBeBytes(chainId)]) - } + if (conf.network !== network) + throw new Error(`Network mismatch: ${conf.network} != ${network}`); - inboxItemAccountAddress(chain: ChainName | ChainId, nttMessage: NttMessage): PublicKey { - const chainId = coalesceChainId(chain) - const serialized = Buffer.from( - serializeLayout(nttManagerMessageLayout(nativeTokenTransferLayout), nttMessage) - ) - const hasher = new Keccak(256) //TODO replace with keccak256 from SDKv2 - hasher.update(Buffer.from(chainIdToBeBytes(chainId))) - hasher.update(serialized) - return this.derivePda(['inbox_item', hasher.digest()]) - } + if (!("ntt" in conf.contracts)) throw new Error("Ntt contracts not found"); + const ntt = conf.contracts["ntt"]; - sessionAuthorityAddress(sender: PublicKey, args: TransferArgs): PublicKey { - const { amount, recipientChain, recipientAddress, shouldQueue } = args - const serialized = Buffer.concat([ - amount.toArrayLike(Buffer, 'be', 8), - Buffer.from(new BN(recipientChain.id).toArrayLike(Buffer, 'be', 2)), - Buffer.from(new Uint8Array(recipientAddress)), - Buffer.from([shouldQueue ? 1 : 0]) - ]) - const hasher = new Keccak(256) - hasher.update(serialized) - return this.derivePda(['session_authority', sender.toBytes(), hasher.digest()]) - } + const version = await SolanaNtt.getVersion( + provider, + //@ts-ignore + conf.contracts + ); - tokenAuthorityAddress(): PublicKey { - return this.derivePda('token_authority') + return new SolanaNtt( + network as N, + chain, + provider, + { ...conf.contracts, ntt }, + version + ); } - emitterAccountAddress(): PublicKey { - return this.derivePda('emitter') + async getConfig(): Promise> { + this.config = this.config ?? (await NTT.getConfig(this.program, this.pdas)); + return this.config!; } - wormholeMessageAccountAddress(outboxItem: PublicKey): PublicKey { - return this.derivePda(['message', outboxItem.toBytes()]) + async getTokenDecimals(): Promise { + const config = await this.getConfig(); + return await SolanaPlatform.getDecimals( + this.chain, + this.connection, + config.mint + ); } - peerAccountAddress(chain: ChainName | ChainId): PublicKey { - const chainId = coalesceChainId(chain) - return this.derivePda(['peer', chainIdToBeBytes(chainId)]) + async getCustodyAddress(): Promise { + return (await this.getConfig()).custody.toBase58(); } - transceiverPeerAccountAddress(chain: ChainName | ChainId): PublicKey { - const chainId = coalesceChainId(chain) - return this.derivePda(['transceiver_peer', chainIdToBeBytes(chainId)]) + static async getVersion( + connection: Connection, + contracts: Contracts & { ntt: Ntt.Contracts }, + sender?: AccountAddress + ): Promise { + return NTT.getVersion( + connection, + new PublicKey(contracts.ntt.manager!), + sender ? new SolanaAddress(sender).unwrap() : undefined + ); } - transceiverMessageAccountAddress(chain: ChainName | ChainId, id: Uint8Array): PublicKey { - const chainId = coalesceChainId(chain) - if (id.length != 32) { - throw new Error('id must be 32 bytes') + async *initialize( + sender: AccountAddress, + args: { + mint: PublicKey; + mode: Ntt.Mode; + outboundLimit: bigint; } - return this.derivePda(['transceiver_message', chainIdToBeBytes(chainId), id]) - } + ) { + const mintInfo = await this.connection.getAccountInfo(args.mint); + if (mintInfo === null) + throw new Error( + "Couldn't determine token program. Mint account is null." + ); - registeredTransceiverAddress(transceiver: PublicKey): PublicKey { - return this.derivePda(['registered_transceiver', transceiver.toBytes()]) - } + const payer = new SolanaAddress(sender).unwrap(); + + const ix = await NTT.createInitializeInstruction( + this.program, + { + ...args, + payer, + owner: payer, + chain: this.chain, + tokenProgram: mintInfo.owner, + }, + this.pdas + ); - // View functions - - async version(pubkey: PublicKey): Promise { - // the anchor library has a built-in method to read view functions. However, - // it requires a signer, which would trigger a wallet prompt on the frontend. - // Instead, we manually construct a versioned transaction and call the - // simulate function with sigVerify: false below. - // - // This way, the simulation won't require a signer, but it still requires - // the pubkey of an account that has some lamports in it (since the - // simulation checks if the account has enough money to pay for the transaction). - // - // It's a little unfortunate but it's the best we can do. - const ix = await this.program.methods.version() - .accountsStrict({}).instruction() - const latestBlockHash = await this.program.provider.connection.getLatestBlockhash() - - const msg = new TransactionMessage({ - payerKey: pubkey, - recentBlockhash: latestBlockHash.blockhash, - instructions: [ix], - }).compileToV0Message(); - - const tx = new VersionedTransaction(msg); - - const txSimulation = - await this.program.provider.connection - .simulateTransaction(tx, { - sigVerify: false, - }) - - // the return buffer is in base64 and it encodes the string with a 32 bit - // little endian length prefix. - const buffer = Buffer.from(txSimulation.value.returnData?.data[0], 'base64') - const len = buffer.readUInt32LE(0) - return buffer.subarray(4, len + 4).toString() - } + const tx = new Transaction(); + tx.feePayer = payer; + tx.add(ix); + yield this.createUnsignedTx( + { transaction: tx, signers: [] }, + "Ntt.Initialize" + ); - // Instructions - - async initialize(args: { - payer: Keypair - owner: Keypair - chain: ChainName - mint: PublicKey - outboundLimit: BN - mode: 'burning' | 'locking' - }): Promise { - const mode: any = - args.mode === 'burning' - ? { burning: {} } - : { locking: {} } - const chainId = toChainId(args.chain) - const mintInfo = await this.program.provider.connection.getAccountInfo(args.mint) - if (mintInfo === null) { - throw new Error("Couldn't determine token program. Mint account is null.") - } - const tokenProgram = mintInfo.owner - const ix = await this.program.methods - .initialize({ chainId, limit: args.outboundLimit, mode }) - .accountsStrict({ - payer: args.payer.publicKey, - deployer: args.owner.publicKey, - programData: programDataAddress(this.program.programId), - config: this.configAccountAddress(), - mint: args.mint, - rateLimit: this.outboxRateLimitAccountAddress(), - tokenProgram, - tokenAuthority: this.tokenAuthorityAddress(), - custody: await this.custodyAccountAddress(args.mint, tokenProgram), - bpfLoaderUpgradeableProgram: BPF_LOADER_UPGRADEABLE_PROGRAM_ID, - associatedTokenProgram: splToken.ASSOCIATED_TOKEN_PROGRAM_ID, - systemProgram: SystemProgram.programId, - }).instruction(); - await this.sendAndConfirmTransaction(new Transaction().add(ix), [args.payer, args.owner], false); - await this.initializeOrUpdateLUT({ payer: args.payer }) + yield* this.initializeOrUpdateLUT({ payer }); } - // This function should be called after each upgrade. If there's nothing to - // do, it won't actually submit a transaction, so it's cheap to call. - async initializeOrUpdateLUT(args: { - payer: Keypair - }): Promise { - // TODO: find a more robust way of fetching a recent slot - const slot = await this.program.provider.connection.getSlot() - 1 - - const [_, lutAddress] = web3.AddressLookupTableProgram.createLookupTable({ - authority: this.lutAuthorityAddress(), - payer: args.payer.publicKey, - recentSlot: slot, - }); - - const whAccs = getWormholeDerivedAccounts(this.program.programId, this.wormholeId) - const config = await this.getConfig() - - const entries = { - config: this.configAccountAddress(), - custody: await this.custodyAccountAddress(config), - tokenProgram: await this.tokenProgram(config), - mint: await this.mintAccountAddress(config), - tokenAuthority: this.tokenAuthorityAddress(), - outboxRateLimit: this.outboxRateLimitAccountAddress(), - wormhole: { - bridge: whAccs.wormholeBridge, - feeCollector: whAccs.wormholeFeeCollector, - sequence: whAccs.wormholeSequence, - program: this.wormholeId, - systemProgram: SystemProgram.programId, - clock: web3.SYSVAR_CLOCK_PUBKEY, - rent: web3.SYSVAR_RENT_PUBKEY, - } - }; + async *initializeOrUpdateLUT(args: { payer: PublicKey }) { + const config = await this.getConfig(); - // collect all pubkeys in entries recursively - const collectPubkeys = (obj: any): Array => { - const pubkeys = new Array() - for (const key in obj) { - const value = obj[key] - if (value instanceof PublicKey) { - pubkeys.push(value) - } else if (typeof value === 'object') { - pubkeys.push(...collectPubkeys(value, pubkeys)) - } - } - return pubkeys - } - const pubkeys = collectPubkeys(entries).map(pk => pk.toBase58()) - - var existingLut: web3.AddressLookupTableAccount | null = null - try { - existingLut = await this.getAddressLookupTable(false) - } catch { - // swallow errors here, it just means that lut doesn't exist - } + const ix = await NTT.initializeOrUpdateLUT(this.program, config, { + payer: args.payer, + wormholeId: new PublicKey(this.core.address), + }); + // Already up to date + if (!ix) return; - if (existingLut !== null) { - const existingPubkeys = existingLut.state.addresses?.map(a => a.toBase58()) ?? [] + const tx = new Transaction().add(ix); + tx.feePayer = args.payer; - // if pubkeys contains keys that are not in the existing LUT, we need to - // add them to the LUT - const missingPubkeys = pubkeys.filter(pk => !existingPubkeys.includes(pk)) + yield this.createUnsignedTx({ transaction: tx }, "Ntt.InitializeLUT"); + } - if (missingPubkeys.length === 0) { - return existingLut - } - } + async *registerTransceiver(args: { + payer: Keypair; + owner: Keypair; + transceiver: PublicKey; + }) { + const config = await this.getConfig(); + if (config.paused) throw new Error("Contract is paused"); const ix = await this.program.methods - .initializeLut(new BN(slot)) + .registerTransceiver() .accountsStrict({ payer: args.payer.publicKey, - authority: this.lutAuthorityAddress(), - lutAddress, - lut: this.lutAccountAddress(), - lutProgram: AddressLookupTableProgram.programId, + owner: args.owner.publicKey, + config: this.pdas.configAccount(), + transceiver: args.transceiver, + registeredTransceiver: this.pdas.registeredTransceiver( + args.transceiver + ), systemProgram: SystemProgram.programId, - entries - }).instruction(); + }) + .instruction(); + + const wormholeMessage = Keypair.generate(); + const whAccs = utils.getWormholeDerivedAccounts( + this.program.programId, + this.core.address + ); + const broadcastIx = await this.program.methods + .broadcastWormholeId() + .accountsStrict({ + payer: args.payer.publicKey, + config: this.pdas.configAccount(), + mint: config.mint, + wormholeMessage: wormholeMessage.publicKey, + emitter: this.pdas.emitterAccount(), + wormhole: { + bridge: whAccs.wormholeBridge, + feeCollector: whAccs.wormholeFeeCollector, + sequence: whAccs.wormholeSequence, + program: this.core.address, + systemProgram: SystemProgram.programId, + clock: web3.SYSVAR_CLOCK_PUBKEY, + rent: web3.SYSVAR_RENT_PUBKEY, + }, + }) + .instruction(); + + const tx = new Transaction(); + tx.feePayer = args.payer.publicKey; + tx.add(ix, broadcastIx); + yield this.createUnsignedTx( + { transaction: tx, signers: [wormholeMessage] }, + "Ntt.RegisterTransceiver" + ); + } + + async *setWormholeTransceiverPeer( + peer: ChainAddress, + payer: AccountAddress + ) { + const sender = new SolanaAddress(payer).unwrap(); + yield this.createUnsignedTx( + await NTT.setWormholeTransceiverPeer(this.program, { + wormholeId: new PublicKey(this.core.address), + payer: sender, + owner: sender, + chain: peer.chain, + address: peer.address.toUniversalAddress().toUint8Array(), + }), + "Ntt.SetWormholeTransceiverPeer" + ); + } - const signers = [args.payer] - await this.sendAndConfirmTransaction(new Transaction().add(ix), signers, false); + async *setPeer( + peer: ChainAddress, + tokenDecimals: number, + inboundLimit: bigint, + payer: AccountAddress + ) { + const sender = new SolanaAddress(payer).unwrap(); + + const ix = await NTT.createSetPeerInstruction(this.program, { + payer: sender, + owner: sender, + chain: peer.chain, + address: peer.address.toUniversalAddress().toUint8Array(), + limit: new BN(inboundLimit.toString()), + tokenDecimals, + }); - // NOTE: explicitly invalidate the cache. This is the only operation that - // modifies the LUT, so this is the only place we need to invalide. - return this.getAddressLookupTable(false) + const tx = new Transaction(); + tx.feePayer = sender; + tx.add(ix); + yield this.createUnsignedTx({ transaction: tx }, "Ntt.SetPeer"); } - async transfer(args: { - payer: Keypair - from: PublicKey - fromAuthority: Keypair - amount: BN - recipientChain: ChainName - recipientAddress: ArrayLike - shouldQueue: boolean + async *transfer( + sender: AccountAddress, + amount: bigint, + destination: ChainAddress, + options: Ntt.TransferOptions, outboxItem?: Keypair - config?: Config - }): Promise { - const config: Config = await this.getConfig(args.config) + ): AsyncGenerator, any, unknown> { + const config = await this.getConfig(); + if (config.paused) throw new Error("Contract is paused"); - const outboxItem = args.outboxItem ?? Keypair.generate() + outboxItem = outboxItem ?? Keypair.generate(); - const txArgs = { - ...args, - payer: args.payer.publicKey, - fromAuthority: args.fromAuthority.publicKey, - outboxItem: outboxItem.publicKey, - config - } + const payerAddress = new SolanaAddress(sender).unwrap(); + const fromAuthority = payerAddress; + const from = await this.getTokenAccount(fromAuthority); - let transferIx: TransactionInstruction - if (config.mode.locking != null) { - transferIx = await this.createTransferLockInstruction(txArgs) - } else if (config.mode.burning != null) { - transferIx = await this.createTransferBurnInstruction(txArgs) - } else { - // @ts-ignore - transferIx = exhaustive(config.mode) - } + const transferArgs = NTT.transferArgs(amount, destination, options.queue); - const releaseIx: TransactionInstruction = await this.createReleaseOutboundInstruction({ - payer: args.payer.publicKey, + const txArgs = { + transferArgs, + payer: payerAddress, + from, + fromAuthority, outboxItem: outboxItem.publicKey, - revertOnDelay: !args.shouldQueue - }) - - const signers = [args.payer, args.fromAuthority, outboxItem] + }; - const transferArgs: TransferArgs = { - amount: args.amount, - recipientChain: { id: toChainId(args.recipientChain) }, - recipientAddress: Array.from(args.recipientAddress), - shouldQueue: args.shouldQueue - } const approveIx = splToken.createApproveInstruction( - args.from, - this.sessionAuthorityAddress(args.fromAuthority.publicKey, transferArgs), - args.fromAuthority.publicKey, - BigInt(args.amount.toString()), + from, + this.pdas.sessionAuthority(fromAuthority, transferArgs), + fromAuthority, + amount, [], config.tokenProgram ); - const tx = new Transaction() - tx.add(approveIx, transferIx, releaseIx) - await this.sendAndConfirmTransaction(tx, signers) - - return outboxItem.publicKey - } - - /** - * Like `sendAndConfirmTransaction` but parses the anchor error code. - */ - private async sendAndConfirmTransaction(tx: Transaction, signers: Keypair[], useLut = true): Promise { - const blockhash = await this.program.provider.connection.getLatestBlockhash() - const luts: AddressLookupTableAccount[] = [] - if (useLut) { - luts.push(await this.getAddressLookupTable()) - } - try { - const messageV0 = new TransactionMessage({ - payerKey: signers[0].publicKey, - recentBlockhash: blockhash.blockhash, - instructions: tx.instructions, - }).compileToV0Message(luts) - - const transactionV0 = new VersionedTransaction(messageV0) - transactionV0.sign(signers) - - // The types for this function are wrong -- the type says it doesn't - // support version transactions, but it does 🤫 - // @ts-ignore - return await sendAndConfirmTransaction(this.program.provider.connection, transactionV0) - } catch (err) { - throw translateError(err, this.errors) - } - } + const transferIx = + config.mode.locking != null + ? NTT.createTransferLockInstruction( + this.program, + config, + txArgs, + this.pdas + ) + : NTT.createTransferBurnInstruction( + this.program, + config, + txArgs, + this.pdas + ); + + const releaseIx = NTT.createReleaseOutboundInstruction( + this.program, + { + payer: payerAddress, + outboxItem: outboxItem.publicKey, + revertOnDelay: !options.queue, + wormholeId: new PublicKey(this.core.address), + }, + this.pdas + ); - /** - * Creates a transfer_burn instruction. The `payer` and `fromAuthority` - * arguments must sign the transaction - */ - async createTransferBurnInstruction(args: { - payer: PublicKey - from: PublicKey - fromAuthority: PublicKey - amount: BN - recipientChain: ChainName - recipientAddress: ArrayLike - outboxItem: PublicKey - shouldQueue: boolean - config?: Config - }): Promise { - const config = await this.getConfig(args.config) - - if (await this.isPaused(config)) { - throw new Error('Contract is paused') - } + const tx = new Transaction(); + tx.feePayer = payerAddress; + tx.add(approveIx, ...(await Promise.all([transferIx, releaseIx]))); - const chainId = toChainId(args.recipientChain) - const mint = await this.mintAccountAddress(config) + if (options.automatic) { + if (!this.quoter) + throw new Error( + "No quoter available, cannot initiate an automatic transfer." + ); - const transferArgs: TransferArgs = { - amount: args.amount, - recipientChain: { id: chainId }, - recipientAddress: Array.from(args.recipientAddress), - shouldQueue: args.shouldQueue - } + const fee = await this.quoteDeliveryPrice(destination.chain, options); - const transferIx = await this.program.methods - .transferBurn(transferArgs) - .accountsStrict({ - common: { - payer: args.payer, - config: { config: this.configAccountAddress() }, - mint, - from: args.from, - tokenProgram: await this.tokenProgram(config), - outboxItem: args.outboxItem, - outboxRateLimit: this.outboxRateLimitAccountAddress(), - custody: await this.custodyAccountAddress(config), - systemProgram: SystemProgram.programId, - }, - peer: this.peerAccountAddress(args.recipientChain), - inboxRateLimit: this.inboxRateLimitAccountAddress(args.recipientChain), - sessionAuthority: this.sessionAuthorityAddress(args.fromAuthority, transferArgs), - tokenAuthority: this.tokenAuthorityAddress() - }) - .instruction() - - const mintInfo = await splToken.getMint( - this.program.provider.connection, - config.mint, - undefined, - config.tokenProgram - ) - const transferHook = splToken.getTransferHook(mintInfo) - - if (transferHook) { - const source = args.from - const mint = config.mint - const destination = await this.custodyAccountAddress(config) - const owner = this.sessionAuthorityAddress(args.fromAuthority, transferArgs) - await addExtraAccountMetasForExecute( - this.program.provider.connection, - transferIx, - transferHook.programId, - source, - mint, - destination, - owner, - // TODO(csongor): compute the amount that's passed into transfer. - // Leaving this 0 is fine unless the transfer hook accounts addresses - // depend on the amount (which is unlikely). - // If this turns out to be the case, the amount to put here is the - // untrimmed amount after removing dust. - 0, + const relayIx = await this.quoter.createRequestRelayInstruction( + payerAddress, + outboxItem.publicKey, + destination.chain, + Number(fee), + // Note: quoter expects gas dropoff to be in terms of gwei + Number(options.gasDropoff ?? 0n) / WEI_PER_GWEI ); + tx.add(relayIx); } - return transferIx - } - - /** - * Creates a transfer_lock instruction. The `payer`, `fromAuthority`, and `outboxItem` - * arguments must sign the transaction - */ - async createTransferLockInstruction(args: { - payer: PublicKey - from: PublicKey - fromAuthority: PublicKey - amount: BN - recipientChain: ChainName - recipientAddress: ArrayLike - shouldQueue: boolean - outboxItem: PublicKey - config?: Config - }): Promise { - const config = await this.getConfig(args.config) - - if (await this.isPaused(config)) { - throw new Error('Contract is paused') - } + const luts: AddressLookupTableAccount[] = []; + try { + luts.push(await this.getAddressLookupTable()); + } catch {} - const chainId = toChainId(args.recipientChain) - const mint = await this.mintAccountAddress(config) + const messageV0 = new TransactionMessage({ + payerKey: payerAddress, + instructions: tx.instructions, + recentBlockhash: (await this.connection.getRecentBlockhash()).blockhash, + }).compileToV0Message(luts); - const transferArgs: TransferArgs = { - amount: args.amount, - recipientChain: { id: chainId }, - recipientAddress: Array.from(args.recipientAddress), - shouldQueue: args.shouldQueue - } + const vtx = new VersionedTransaction(messageV0); - const transferIx = await this.program.methods - .transferLock(transferArgs) - .accounts({ - common: { - payer: args.payer, - config: { config: this.configAccountAddress() }, - mint, - from: args.from, - tokenProgram: await this.tokenProgram(config), - outboxItem: args.outboxItem, - outboxRateLimit: this.outboxRateLimitAccountAddress(), - custody: await this.custodyAccountAddress(config) - }, - peer: this.peerAccountAddress(args.recipientChain), - inboxRateLimit: this.inboxRateLimitAccountAddress(args.recipientChain), - sessionAuthority: this.sessionAuthorityAddress(args.fromAuthority, transferArgs) - }) - .instruction() + yield this.createUnsignedTx( + { transaction: vtx, signers: [outboxItem] }, + "Ntt.Transfer" + ); + } - const mintInfo = await splToken.getMint( - this.program.provider.connection, + private async getTokenAccount(sender: PublicKey): Promise { + const config = await this.getConfig(); + const tokenAccount = await splToken.getAssociatedTokenAddress( config.mint, - undefined, + sender, + true, config.tokenProgram - ) - const transferHook = splToken.getTransferHook(mintInfo) - - if (transferHook) { - const source = args.from - const mint = config.mint - const destination = await this.custodyAccountAddress(config) - const owner = this.sessionAuthorityAddress(args.fromAuthority, transferArgs) - await addExtraAccountMetasForExecute( - this.program.provider.connection, - transferIx, - transferHook.programId, - source, - mint, - destination, - owner, - // TODO(csongor): compute the amount that's passed into transfer. - // Leaving this 0 is fine unless the transfer hook accounts addresses - // depend on the amount (which is unlikely). - // If this turns out to be the case, the amount to put here is the - // untrimmed amount after removing dust. - 0, - ); - } - - return transferIx - - } - - /** - * Creates a release_outbound instruction. The `payer` needs to sign the transaction. - */ - async createReleaseOutboundInstruction(args: { - payer: PublicKey - outboxItem: PublicKey - revertOnDelay: boolean - }): Promise { - const whAccs = getWormholeDerivedAccounts(this.program.programId, this.wormholeId) - - return await this.program.methods - .releaseWormholeOutbound({ - revertOnDelay: args.revertOnDelay - }) - .accounts({ - payer: args.payer, - config: { config: this.configAccountAddress() }, - outboxItem: args.outboxItem, - wormholeMessage: this.wormholeMessageAccountAddress(args.outboxItem), - emitter: whAccs.wormholeEmitter, - transceiver: this.registeredTransceiverAddress(this.program.programId), - wormhole: { - bridge: whAccs.wormholeBridge, - feeCollector: whAccs.wormholeFeeCollector, - sequence: whAccs.wormholeSequence, - program: this.wormholeId - } - }) - .instruction() - } - - async releaseOutbound(args: { - payer: Keypair - outboxItem: PublicKey - revertOnDelay: boolean - config?: Config - }) { - if (await this.isPaused()) { - throw new Error('Contract is paused') - } - - const txArgs = { - ...args, - payer: args.payer.publicKey - } - - const tx = new Transaction() - tx.add(await this.createReleaseOutboundInstruction(txArgs)) - - const signers = [args.payer] - return await this.sendAndConfirmTransaction(tx, signers) - } - - // TODO: document that if recipient is provided, then the instruction can be - // created before the inbox item is created (i.e. they can be put in the same tx) - async createReleaseInboundMintInstruction(args: { - payer: PublicKey - chain: ChainName | ChainId - nttMessage: NttMessage - revertOnDelay: boolean - recipient?: PublicKey - config?: Config - }): Promise { - const config = await this.getConfig(args.config) - - if (await this.isPaused(config)) { - throw new Error('Contract is paused') - } - - const recipientAddress = - args.recipient ?? (await this.getInboxItem(args.chain, args.nttMessage)).recipientAddress - - const mint = await this.mintAccountAddress(config) - - const transferIx = await this.program.methods - .releaseInboundMint({ - revertOnDelay: args.revertOnDelay - }) - .accountsStrict({ - common: { - payer: args.payer, - config: { config: this.configAccountAddress() }, - inboxItem: this.inboxItemAccountAddress(args.chain, args.nttMessage), - recipient: getAssociatedTokenAddressSync(mint, recipientAddress, true, config.tokenProgram), - mint, - tokenAuthority: this.tokenAuthorityAddress(), - tokenProgram: config.tokenProgram, - custody: await this.custodyAccountAddress(config) - } - }) - .instruction() - - const mintInfo = await splToken.getMint(this.program.provider.connection, config.mint, undefined, config.tokenProgram) - const transferHook = splToken.getTransferHook(mintInfo) - - if (transferHook) { - const source = await this.custodyAccountAddress(config) - const mint = config.mint - const destination = getAssociatedTokenAddressSync(mint, recipientAddress, true, config.tokenProgram) - const owner = this.tokenAuthorityAddress() - await addExtraAccountMetasForExecute( - this.program.provider.connection, - transferIx, - transferHook.programId, - source, - mint, - destination, - owner, - // TODO(csongor): compute the amount that's passed into transfer. - // Leaving this 0 is fine unless the transfer hook accounts addresses - // depend on the amount (which is unlikely). - // If this turns out to be the case, the amount to put here is the - // untrimmed amount after removing dust. - 0, + ); + return tokenAccount; + } + + private async *createAta(sender: AccountAddress) { + const config = await this.getConfig(); + const senderAddress = new SolanaAddress(sender).unwrap(); + + const ata = await this.getTokenAccount(senderAddress); + + // If the ata doesn't exist yet, create it + const acctInfo = await this.connection.getAccountInfo(ata); + if (acctInfo === null) { + const transaction = new Transaction().add( + createAssociatedTokenAccountInstruction( + senderAddress, + ata, + senderAddress, + config.mint, + config.tokenProgram + ) ); + transaction.feePayer = senderAddress; + yield this.createUnsignedTx({ transaction }, "Redeem.CreateATA"); } - - return transferIx } - async releaseInboundMint(args: { - payer: Keypair - chain: ChainName | ChainId - nttMessage: NttMessage - revertOnDelay: boolean - config?: Config - }): Promise { - if (await this.isPaused()) { - throw new Error('Contract is paused') - } - - const txArgs = { - ...args, - payer: args.payer.publicKey - } - - const tx = new Transaction() - tx.add(await this.createReleaseInboundMintInstruction(txArgs)) + async *redeem(attestations: Ntt.Attestation[], payer: AccountAddress) { + const config = await this.getConfig(); + if (config.paused) throw new Error("Contract is paused"); - const signers = [args.payer] - await this.sendAndConfirmTransaction(tx, signers) - } + // TODO: not this, we should iterate over the set of enabled xcvrs? + // if (attestations.length !== this.xcvrs.length) throw "No"; + const wormholeNTT = attestations[0]! as WormholeNttTransceiver.VAA; - async createReleaseInboundUnlockInstruction(args: { - payer: PublicKey - chain: ChainName | ChainId - nttMessage: NttMessage - revertOnDelay: boolean - recipient?: PublicKey - config?: Config - }): Promise { - const config = await this.getConfig(args.config) - - if (await this.isPaused(config)) { - throw new Error('Contract is paused') - } + // Create the vaa if necessary + yield* this.createAta(payer); - const recipientAddress = - args.recipient ?? (await this.getInboxItem(args.chain, args.nttMessage)).recipientAddress + // Post the VAA that we intend to redeem + yield* this.core.postVaa(payer, wormholeNTT); - const mint = await this.mintAccountAddress(config) - - const transferIx = await this.program.methods - .releaseInboundUnlock({ - revertOnDelay: args.revertOnDelay - }) - .accountsStrict({ - common: { - payer: args.payer, - config: { config: this.configAccountAddress() }, - inboxItem: this.inboxItemAccountAddress(args.chain, args.nttMessage), - recipient: getAssociatedTokenAddressSync(mint, recipientAddress, true, config.tokenProgram), - mint, - tokenAuthority: this.tokenAuthorityAddress(), - tokenProgram: config.tokenProgram, - custody: await this.custodyAccountAddress(config) - }, - }) - .instruction() - - const mintInfo = await splToken.getMint(this.program.provider.connection, config.mint, undefined, config.tokenProgram) - const transferHook = splToken.getTransferHook(mintInfo) - - if (transferHook) { - const source = await this.custodyAccountAddress(config) - const mint = config.mint - const destination = getAssociatedTokenAddressSync(mint, recipientAddress, true, config.tokenProgram) - const owner = this.tokenAuthorityAddress() - await addExtraAccountMetasForExecute( - this.program.provider.connection, - transferIx, - transferHook.programId, - source, - mint, - destination, - owner, - // TODO(csongor): compute the amount that's passed into transfer. - // Leaving this 0 is fine unless the transfer hook accounts addresses - // depend on the amount (which is unlikely). - // If this turns out to be the case, the amount to put here is the - // untrimmed amount after removing dust. - 0, - ); - } + const senderAddress = new SolanaAddress(payer).unwrap(); - return transferIx - } - - async releaseInboundUnlock(args: { - payer: Keypair - chain: ChainName | ChainId - nttMessage: NttMessage - revertOnDelay: boolean - config?: Config - }): Promise { - if (await this.isPaused()) { - throw new Error('Contract is paused') - } - - const txArgs = { - ...args, - payer: args.payer.publicKey - } + const receiveMessageIx = NTT.createReceiveWormholeMessageInstruction( + this.program, + { + wormholeId: new PublicKey(this.core.address), + payer: senderAddress, + vaa: wormholeNTT, + }, + this.pdas + ); - const tx = new Transaction() - tx.add(await this.createReleaseInboundUnlockInstruction(txArgs)) + const nttMessage = wormholeNTT.payload.nttManagerPayload; + const emitterChain = wormholeNTT.emitterChain; + const releaseArgs = { + payer: senderAddress, + config, + nttMessage, + recipient: new PublicKey( + nttMessage.payload.recipientAddress.toUint8Array() + ), + chain: emitterChain, + revertOnDelay: false, + }; - const signers = [args.payer] - await this.sendAndConfirmTransaction(tx, signers) - } + const redeemIx = NTT.createRedeemInstruction(this.program, config, { + payer: senderAddress, + vaa: wormholeNTT, + }); - async setPeer(args: { - payer: Keypair - owner: Keypair - chain: ChainName - address: ArrayLike - limit: BN - tokenDecimals: number - config?: Config - }) { - const ix = await this.program.methods.setPeer({ - chainId: { id: toChainId(args.chain) }, - address: Array.from(args.address), - limit: args.limit, - tokenDecimals: args.tokenDecimals - }) - .accounts({ - payer: args.payer.publicKey, - owner: args.owner.publicKey, - config: this.configAccountAddress(), - peer: this.peerAccountAddress(args.chain), - inboxRateLimit: this.inboxRateLimitAccountAddress(args.chain) - }).instruction() - return await this.sendAndConfirmTransaction(new Transaction().add(ix), [args.payer, args.owner]) - } + const releaseIx = + config.mode.locking != null + ? NTT.createReleaseInboundUnlockInstruction( + this.program, + config, + releaseArgs + ) + : NTT.createReleaseInboundMintInstruction( + this.program, + config, + releaseArgs + ); + + const tx = new Transaction(); + tx.feePayer = senderAddress; + tx.add(...(await Promise.all([receiveMessageIx, redeemIx, releaseIx]))); + + const luts: AddressLookupTableAccount[] = []; + try { + luts.push(await this.getAddressLookupTable()); + } catch {} - async setWormholeTransceiverPeer(args: { - payer: Keypair - owner: Keypair - chain: ChainName - address: ArrayLike - config?: Config - }) { - const ix = await this.program.methods.setWormholePeer({ - chainId: { id: toChainId(args.chain) }, - address: Array.from(args.address) - }) - .accounts({ - payer: args.payer.publicKey, - owner: args.owner.publicKey, - config: this.configAccountAddress(), - peer: this.transceiverPeerAccountAddress(args.chain) - }).instruction() - - const wormholeMessage = Keypair.generate() - const whAccs = getWormholeDerivedAccounts(this.program.programId, this.wormholeId) - const broadcastIx = await this.program.methods.broadcastWormholePeer({ chainId: toChainId(args.chain) }) - .accounts({ - payer: args.payer.publicKey, - config: this.configAccountAddress(), - peer: this.transceiverPeerAccountAddress(args.chain), - wormholeMessage: wormholeMessage.publicKey, - emitter: this.emitterAccountAddress(), - wormhole: { - bridge: whAccs.wormholeBridge, - feeCollector: whAccs.wormholeFeeCollector, - sequence: whAccs.wormholeSequence, - program: this.wormholeId - } - }).instruction() - return await this.sendAndConfirmTransaction(new Transaction().add(ix, broadcastIx), [args.payer, args.owner, wormholeMessage]) - } + const messageV0 = new TransactionMessage({ + payerKey: senderAddress, + instructions: tx.instructions, + recentBlockhash: (await this.connection.getRecentBlockhash()).blockhash, + }).compileToV0Message(luts); - async registerTransceiver(args: { - payer: Keypair - owner: Keypair - transceiver: PublicKey - }) { - const ix = await this.program.methods.registerTransceiver() - .accounts({ - payer: args.payer.publicKey, - owner: args.owner.publicKey, - config: this.configAccountAddress(), - transceiver: args.transceiver, - registeredTransceiver: this.registeredTransceiverAddress(args.transceiver) - }).instruction() + const vtx = new VersionedTransaction(messageV0); - const wormholeMessage = Keypair.generate() - const whAccs = getWormholeDerivedAccounts(this.program.programId, this.wormholeId) - const broadcastIx = await this.program.methods.broadcastWormholeId() - .accounts({ - payer: args.payer.publicKey, - config: this.configAccountAddress(), - mint: await this.mintAccountAddress(), - wormholeMessage: wormholeMessage.publicKey, - emitter: this.emitterAccountAddress(), - wormhole: { - bridge: whAccs.wormholeBridge, - feeCollector: whAccs.wormholeFeeCollector, - sequence: whAccs.wormholeSequence, - program: this.wormholeId - } - }).instruction() - return await this.sendAndConfirmTransaction( - new Transaction().add(ix, broadcastIx), [args.payer, args.owner, wormholeMessage]) + yield this.createUnsignedTx({ transaction: vtx }, "Ntt.Redeem"); } - async setOutboundLimit(args: { - owner: Keypair - chain: ChainName - limit: BN - }) { - const ix = await this.program.methods.setOutboundLimit({ - limit: args.limit - }) - .accounts({ - owner: args.owner.publicKey, - config: this.configAccountAddress(), - rateLimit: this.outboxRateLimitAccountAddress(), - }).instruction(); - return this.sendAndConfirmTransaction(new Transaction().add(ix), [args.owner]); + async getCurrentOutboundCapacity(): Promise { + const rl = await this.program.account.outboxRateLimit.fetch( + this.pdas.outboxRateLimitAccount() + ); + return BigInt(rl.rateLimit.capacityAtLastTx.toString()); } - async setInboundLimit(args: { - owner: Keypair - chain: ChainName - limit: BN - }) { - const ix = await this.program.methods.setInboundLimit({ - chainId: { id: toChainId(args.chain) }, - limit: args.limit - }) - .accounts({ - owner: args.owner.publicKey, - config: this.configAccountAddress(), - rateLimit: this.inboxRateLimitAccountAddress(args.chain), - }).instruction(); - return this.sendAndConfirmTransaction(new Transaction().add(ix), [args.owner]); + async getCurrentInboundCapacity(fromChain: Chain): Promise { + const rl = await this.program.account.inboxRateLimit.fetch( + this.pdas.inboxRateLimitAccount(fromChain) + ); + return BigInt(rl.rateLimit.capacityAtLastTx.toString()); } - async createReceiveWormholeMessageInstruction(args: { - payer: PublicKey - vaa: SignedVaa - config?: Config - }): Promise { - const config = await this.getConfig(args.config) - - if (await this.isPaused(config)) { - throw new Error('Contract is paused') - } + async getIsExecuted(attestation: Ntt.Attestation): Promise { + if (!this.getIsApproved(attestation)) return false; - const wormholeNTT = deserialize('Ntt:WormholeTransfer', args.vaa) - const nttMessage = wormholeNTT.payload.nttManagerPayload - // NOTE: we do an 'as ChainId' cast here, which is generally unsafe. - // TODO: explain why this is fine here - const chainId = SDKv2toChainId(wormholeNTT.emitterChain) as ChainId - - const transceiverPeer = this.transceiverPeerAccountAddress(chainId) + const { emitterChain } = attestation as WormholeNttTransceiver.VAA; + const inboundQueued = await this.getInboundQueuedTransfer( + emitterChain, + attestation + ); - return await this.program.methods.receiveWormholeMessage().accounts({ - payer: args.payer, - config: { config: this.configAccountAddress() }, - peer: transceiverPeer, - vaa: derivePostedVaaKey(this.wormholeId, Buffer.from(wormholeNTT.hash)), - transceiverMessage: this.transceiverMessageAccountAddress( - chainId, - nttMessage.id - ) - }).instruction() + return inboundQueued === null; } - async createRedeemInstruction(args: { - payer: PublicKey - vaa: SignedVaa - config?: Config - }): Promise { - const config = await this.getConfig(args.config) + async getIsApproved(attestation: Ntt.Attestation): Promise { + const digest = (attestation as WormholeNttTransceiver.VAA).hash; + const vaaAddress = utils.derivePostedVaaKey( + this.core.address, + Buffer.from(digest) + ); - if (await this.isPaused(config)) { - throw new Error('Contract is paused') - } + try { + const info = this.connection.getAccountInfo(vaaAddress); + return info !== null; + } catch (_) {} - const wormholeNTT = deserialize('Ntt:WormholeTransfer', args.vaa) - const nttMessage = wormholeNTT.payload.nttManagerPayload - // NOTE: we do an 'as ChainId' cast here, which is generally unsafe. - // TODO: explain why this is fine here - const chainId = SDKv2toChainId(wormholeNTT.emitterChain) as ChainId - - const nttManagerPeer = this.peerAccountAddress(chainId) - const inboxRateLimit = this.inboxRateLimitAccountAddress(chainId) - - return await this.program.methods - .redeem({}) - .accounts({ - payer: args.payer, - config: this.configAccountAddress(), - peer: nttManagerPeer, - transceiverMessage: this.transceiverMessageAccountAddress(chainId, nttMessage.id), - transceiver: this.registeredTransceiverAddress(this.program.programId), - mint: await this.mintAccountAddress(config), - inboxItem: this.inboxItemAccountAddress(chainId, nttMessage), - inboxRateLimit, - outboxRateLimit: this.outboxRateLimitAccountAddress() - }) - .instruction() + return false; } - /** - * Redeems a VAA. - * - * @returns Whether the transfer was released. If the transfer was delayed, - * this will be false. In that case, a subsequent call to - * `releaseInboundMint` or `releaseInboundUnlock` will release the - * transfer after the delay (24h). - */ - async redeem(args: { - payer: Keypair - vaa: SignedVaa - config?: Config - }): Promise { - const config = await this.getConfig(args.config) - - const redeemArgs = { - ...args, - payer: args.payer.publicKey - } - - const wormholeNTT = deserialize('Ntt:WormholeTransfer', args.vaa) - const nttMessage = wormholeNTT.payload.nttManagerPayload - // TODO: explain why this is fine here - const chainId = SDKv2toChainId(wormholeNTT.emitterChain) as ChainId - - // Here we create a transaction with three instructions: - // 1. receive wormhole messsage (vaa) - // 1. redeem - // 2. releaseInboundMint or releaseInboundUnlock (depending on mode) - // - // The first instruction verifies the VAA. - // The second instruction places the transfer in the inbox, then the third instruction - // releases it. - // - // In case the redeemed amount exceeds the remaining inbound rate limit capacity, - // the transaction gets delayed. If this happens, the second instruction will not actually - // be able to release the transfer yet. - // To make sure the transaction still succeeds, we set revertOnDelay to false, which will - // just make the second instruction a no-op in case the transfer is delayed. - - const tx = new Transaction() - tx.add(await this.createReceiveWormholeMessageInstruction(redeemArgs)) - tx.add(await this.createRedeemInstruction(redeemArgs)) + async *completeInboundQueuedTransfer( + fromChain: Chain, + transceiverMessage: Ntt.Message, + token: TokenAddress, + payer: AccountAddress + ) { + const config = await this.getConfig(); + if (config.paused) throw new Error("Contract is paused"); + const senderAddress = new SolanaAddress(payer).unwrap(); + const tx = new Transaction(); + tx.feePayer = senderAddress; const releaseArgs = { - ...args, - payer: args.payer.publicKey, - nttMessage, - recipient: new PublicKey(nttMessage.payload.recipientAddress.toUint8Array()), - chain: chainId, + payer: senderAddress, + config, + nttMessage: transceiverMessage, + recipient: new PublicKey( + transceiverMessage.payload.recipientAddress.toUint8Array() + ), + chain: fromChain, revertOnDelay: false, - config: config - } - - if (config.mode.locking != null) { - tx.add(await this.createReleaseInboundUnlockInstruction(releaseArgs)) - } else { - tx.add(await this.createReleaseInboundMintInstruction(releaseArgs)) - } - - const signers = [args.payer] - await this.sendAndConfirmTransaction(tx, signers) + }; - // Let's check if the transfer was released - const inboxItem = await this.getInboxItem(chainId, nttMessage) - return inboxItem.releaseStatus.released !== undefined - } + tx.add( + await (config.mode.locking != null + ? NTT.createReleaseInboundUnlockInstruction( + this.program, + config, + releaseArgs + ) + : NTT.createReleaseInboundMintInstruction( + this.program, + config, + releaseArgs + )) + ); - // Account access - - /** - * Fetches the Config account from the contract. - * - * @param config If provided, the config is just returned without making a - * network request. This is handy in case multiple config - * accessor functions are used, the config can just be queried - * once and passed around. - */ - async getConfig(config?: Config): Promise { - return config ?? await this.program.account.config.fetch(this.configAccountAddress()) + yield this.createUnsignedTx( + { transaction: tx }, + "Ntt.CompleteInboundTransfer" + ); } - async isPaused(config?: Config): Promise { - return (await this.getConfig(config)).paused - } + async getInboundQueuedTransfer( + chain: Chain, + nttMessage: Ntt.Message + ): Promise | null> { + const inboxItem = await this.program.account.inboxItem.fetch( + this.pdas.inboxItemAccount(chain, nttMessage) + ); + if (!inboxItem) return null; - async mintAccountAddress(config?: Config): Promise { - return (await this.getConfig(config)).mint - } + const { recipientAddress, amount, releaseStatus } = inboxItem!; + const rateLimitExpiry = releaseStatus.releaseAfter + ? releaseStatus.releaseAfter[0].toNumber() + : 0; - async tokenProgram(config?: Config): Promise { - return (await this.getConfig(config)).tokenProgram - } + const xfer: Ntt.InboundQueuedTransfer = { + recipient: new SolanaAddress(recipientAddress) as NativeAddress, + amount: BigInt(amount.toString()), + rateLimitExpiryTimestamp: rateLimitExpiry, + }; - async getInboxItem(chain: ChainName | ChainId, nttMessage: NttMessage): Promise { - return await this.program.account.inboxItem.fetch(this.inboxItemAccountAddress(chain, nttMessage)) + return xfer; } - async getAddressLookupTable(useCache = true): Promise { + async getAddressLookupTable( + useCache = true + ): Promise { if (!useCache || !this.addressLookupTable) { - const lut = await this.program.account.lut.fetchNullable(this.lutAccountAddress()) - if (!lut) { - throw new Error('Address lookup table not found. Did you forget to call initializeLUT?') - } - const response = await this.program.provider.connection.getAddressLookupTable(lut.address) - this.addressLookupTable = response.value + const alut = await NTT.getAddressLookupTable(this.program, this.pdas); + if (alut) this.addressLookupTable = alut; } - if (!this.addressLookupTable) { - throw new Error('Address lookup table not found. Did you forget to call initializeLUT?') - } - return this.addressLookupTable - } - - /** - * Returns the address of the custody account. If the config is available - * (i.e. the program is initialised), the mint is derived from the config. - * Otherwise, the mint must be provided. - */ - async custodyAccountAddress(configOrMint: Config | PublicKey, tokenProgram = splToken.TOKEN_PROGRAM_ID): Promise { - if (configOrMint instanceof PublicKey) { - return splToken.getAssociatedTokenAddress(configOrMint, this.tokenAuthorityAddress(), true, tokenProgram) - } else { - return splToken.getAssociatedTokenAddress(configOrMint.mint, this.tokenAuthorityAddress(), true, configOrMint.tokenProgram) - } - } -} - -function exhaustive(_: never): A { - throw new Error('Impossible') -} -/** - * TODO: this is copied from @solana/spl-token, because the most recent released - * version (0.4.3) is broken (does object equality instead of structural on the pubkey) - * - * this version fixes that error, looks like it's also fixed on main: - * https://github.com/solana-labs/solana-program-library/blob/ad4eb6914c5e4288ad845f29f0003cd3b16243e7/token/js/src/extensions/transferHook/instructions.ts#L208 - */ -async function addExtraAccountMetasForExecute( - connection: Connection, - instruction: TransactionInstruction, - programId: PublicKey, - source: PublicKey, - mint: PublicKey, - destination: PublicKey, - owner: PublicKey, - amount: number | bigint, - commitment?: Commitment -) { - const validateStatePubkey = splToken.getExtraAccountMetaAddress(mint, programId); - const validateStateAccount = await connection.getAccountInfo(validateStatePubkey, commitment); - if (validateStateAccount == null) { - return instruction; - } - const validateStateData = splToken.getExtraAccountMetas(validateStateAccount); + if (!this.addressLookupTable) + throw new Error( + "Address lookup table not found. Did you forget to call initializeLUT?" + ); - // Check to make sure the provided keys are in the instruction - if (![source, mint, destination, owner].every((key) => instruction.keys.some((meta) => meta.pubkey.equals(key)))) { - throw new Error('Missing required account in instruction'); - } + return this.addressLookupTable; + } - const executeInstruction = splToken.createExecuteInstruction( - programId, - source, - mint, - destination, - owner, - validateStatePubkey, - BigInt(amount) + createUnsignedTx( + txReq: SolanaTransaction, + description: string, + parallelizable: boolean = false + ): SolanaUnsignedTransaction { + return new SolanaUnsignedTransaction( + txReq, + this.network, + this.chain, + description, + parallelizable ); - - for (const extraAccountMeta of validateStateData) { - executeInstruction.keys.push( - deEscalateAccountMeta( - await splToken.resolveExtraAccountMeta( - connection, - extraAccountMeta, - executeInstruction.keys, - executeInstruction.data, - executeInstruction.programId - ), - executeInstruction.keys - ) - ); - } - - // Add only the extra accounts resolved from the validation state - instruction.keys.push(...executeInstruction.keys.slice(5)); - - // Add the transfer hook program ID and the validation state account - instruction.keys.push({ pubkey: programId, isSigner: false, isWritable: false }); - instruction.keys.push({ pubkey: validateStatePubkey, isSigner: false, isWritable: false }); -} - -// TODO: delete (see above) -function deEscalateAccountMeta(accountMeta: AccountMeta, accountMetas: AccountMeta[]): AccountMeta { - const maybeHighestPrivileges = accountMetas - .filter((x) => x.pubkey.equals(accountMeta.pubkey)) - .reduce<{ isSigner: boolean; isWritable: boolean } | undefined>((acc, x) => { - if (!acc) return { isSigner: x.isSigner, isWritable: x.isWritable }; - return { isSigner: acc.isSigner || x.isSigner, isWritable: acc.isWritable || x.isWritable }; - }, undefined); - if (maybeHighestPrivileges) { - const { isSigner, isWritable } = maybeHighestPrivileges; - if (!isSigner && isSigner !== accountMeta.isSigner) { - accountMeta.isSigner = false; - } - if (!isWritable && isWritable !== accountMeta.isWritable) { - accountMeta.isWritable = false; - } - } - return accountMeta; + } } diff --git a/solana/ts/sdk/nttLayout.ts b/solana/ts/sdk/nttLayout.ts deleted file mode 100644 index 1b7a4be99..000000000 --- a/solana/ts/sdk/nttLayout.ts +++ /dev/null @@ -1,173 +0,0 @@ -import { - CustomConversion, - CustomizableBytes, - Layout, - LayoutToType, - Platform, -} from "@wormhole-foundation/sdk-base"; -import { - customizableBytes, - deserializeLayout, - serializeLayout, -} from "@wormhole-foundation/sdk-base"; -import { - EmptyPlatformMap, - NamedPayloads, - RegisterPayloadTypes, - layoutItems, - registerPayloadTypes, -} from "@wormhole-foundation/sdk-definitions"; - -export const trimmedAmountLayout = [ - { name: "decimals", binary: "uint", size: 1 }, - { name: "amount", binary: "uint", size: 8 }, -] as const satisfies Layout; - -export type TrimmedAmount = LayoutToType; - -export type Prefix = readonly [number, number, number, number]; - -const prefixItem = (prefix: Prefix) => - ({ - name: "prefix", - binary: "bytes", - custom: Uint8Array.from(prefix), - omit: true, - } as const); - -export const nativeTokenTransferLayout = [ - prefixItem([0x99, 0x4e, 0x54, 0x54]), - { name: "trimmedAmount", binary: "bytes", layout: trimmedAmountLayout }, - { name: "sourceToken", ...layoutItems.universalAddressItem }, - { name: "recipientAddress", ...layoutItems.universalAddressItem }, - { name: "recipientChain", ...layoutItems.chainItem() }, //TODO restrict to supported chains? -] as const satisfies Layout; - -export type NativeTokenTransfer = LayoutToType< - typeof nativeTokenTransferLayout ->; - -export const transceiverMessageLayout = < - const MP extends CustomizableBytes = undefined, - const TP extends CustomizableBytes = undefined ->( - prefix: Prefix, - nttManagerPayload?: MP, - transceiverPayload?: TP -) => - [ - prefixItem(prefix), - { name: "sourceNttManager", ...layoutItems.universalAddressItem }, - { name: "recipientNttManager", ...layoutItems.universalAddressItem }, - customizableBytes( - { name: "nttManagerPayload", lengthSize: 2 }, - nttManagerPayload - ), - customizableBytes( - { name: "transceiverPayload", lengthSize: 2 }, - transceiverPayload - ), - ] as const satisfies Layout; - -export type TransceiverMessage< - MP extends CustomizableBytes = undefined, - TP extends CustomizableBytes = undefined -> = LayoutToType>>; - -export const nttManagerMessageLayout = < - const P extends CustomizableBytes = undefined ->( - customPayload?: P -) => - [ - { name: "id", binary: "bytes", size: 32 }, - { name: "sender", ...layoutItems.universalAddressItem }, - customizableBytes({ name: "payload", lengthSize: 2 }, customPayload), - ] as const satisfies Layout; - -export type NttManagerMessage

= - LayoutToType>>; - -const optionalWormholeTransceiverPayloadLayout = [ - { name: "version", binary: "uint", size: 2, custom: 1, omit: true }, - { - name: "forSpecializedRelayer", - binary: "uint", - size: 1, - custom: { - to: (val: number) => val > 0, - from: (val: boolean) => (val ? 1 : 0), - }, - }, -] as const satisfies Layout; - -type OptionalWormholeTransceiverPayload = LayoutToType< - typeof optionalWormholeTransceiverPayloadLayout ->; -const optionalWormholeTransceiverPayloadConversion = { - to: (encoded: Uint8Array) => - encoded.length === 0 - ? null - : deserializeLayout(optionalWormholeTransceiverPayloadLayout, encoded), - - from: (value: OptionalWormholeTransceiverPayload | null): Uint8Array => - value === null - ? new Uint8Array(0) - : serializeLayout(optionalWormholeTransceiverPayloadLayout, value), -} as const satisfies CustomConversion< - Uint8Array, - OptionalWormholeTransceiverPayload | null ->; - -export const wormholeTransceiverMessageLayout = < - MP extends CustomizableBytes = undefined ->( - nttManagerPayload?: MP -) => - transceiverMessageLayout( - [0x99, 0x45, 0xff, 0x10], - nttManagerPayload, - optionalWormholeTransceiverPayloadConversion - ); - -export type WormholeTransceiverMessage< - MP extends CustomizableBytes = undefined -> = LayoutToType>>; - -const wormholeNativeTokenTransferLayout = wormholeTransceiverMessageLayout( - nttManagerMessageLayout(nativeTokenTransferLayout) -); - -export const transceiverInstructionLayout = < - const P extends CustomizableBytes = undefined ->( - customPayload?: P -) => - [ - { name: "index", binary: "uint", size: 1 }, - customizableBytes({ name: "payload", lengthSize: 1 }, customPayload), - ] as const satisfies Layout; - -export const nttNamedPayloads = [ - ["WormholeTransfer", wormholeNativeTokenTransferLayout], -] as const satisfies NamedPayloads; - -export type NttProtocol = "Ntt"; - -// factory registration: -declare module "@wormhole-foundation/sdk-definitions" { - export namespace WormholeRegistry { - interface ProtocolToPlatformMapping { - Ntt: EmptyPlatformMap; - } - } -} -// factory registration: -declare module "@wormhole-foundation/sdk-definitions" { - export namespace WormholeRegistry { - interface PayloadLiteralToLayoutMapping - extends RegisterPayloadTypes {} - } -} - -registerPayloadTypes("Ntt", nttNamedPayloads); diff --git a/solana/ts/sdk/quoter.ts b/solana/ts/sdk/quoter.ts deleted file mode 100644 index 4407d0e8f..000000000 --- a/solana/ts/sdk/quoter.ts +++ /dev/null @@ -1,299 +0,0 @@ -import { - deserializeLayout, - Chain, - toChainId, -} from "@wormhole-foundation/sdk-base"; -import { - Connection, - PublicKeyInitData, - PublicKey, - SystemProgram, - LAMPORTS_PER_SOL, -} from "@solana/web3.js"; -import { Program } from "@coral-xyz/anchor"; -import { NttQuoter as Idl } from '../../idl/ts/ntt_quoter' -import IDL from "../../idl/json/ntt_quoter.json"; -import { U64, programDataLayout, programDataAddress, chainIdToBeBytes, derivePda } from "./utils"; - -//constants that must match ntt-quoter lib.rs / implementation: -const USD_UNIT = 1e6; -const WEI_PER_GWEI = 1e9; -const GWEI_PER_ETH = 1e9; -const SEED_PREFIX_INSTANCE = "instance"; -const SEED_PREFIX_REGISTERED_CHAIN = "registered_chain"; -const SEED_PREFIX_REGISTERED_NTT = "registered_ntt"; -const SEED_PREFIX_RELAY_REQUEST = "relay_request"; - -export class NttQuoter { - readonly instance: PublicKey; - private readonly program: Program; - - constructor(connection: Connection, programId: PublicKeyInitData) { - this.program = new Program(IDL as Idl, new PublicKey(programId), {connection}); - this.instance = derivePda([SEED_PREFIX_INSTANCE], this.program.programId); - } - - // ---- user relevant functions ---- - - async calcRelayCostInSol(nttProgramId: PublicKey, chain: Chain, requestedGasDropoffEth: number) { - const [chainData, nttData, instanceData, rentCost] = await Promise.all([ - this.getRegisteredChain(chain), - this.getRegisteredNtt(nttProgramId), - this.getInstance(), - this.program.provider.connection.getMinimumBalanceForRentExemption( - this.program.account.relayRequest.size - ) - ]); - - if (requestedGasDropoffEth > chainData.maxGasDropoffEth) - throw new Error("Requested gas dropoff exceeds allowed maximum"); - - const totalNativeGasCostUsd = chainData.nativePriceUsd * - (requestedGasDropoffEth + chainData.gasPriceGwei * nttData.gasCost / GWEI_PER_ETH); - - const totalCostSol = rentCost / LAMPORTS_PER_SOL + - (chainData.basePriceUsd + totalNativeGasCostUsd) / instanceData.solPriceUsd; - - return totalCostSol; - } - - async createRequestRelayInstruction( - payer: PublicKey, - outboxItem: PublicKey, - chain: Chain, - maxFeeSol: number, - gasDropoffEth: number, - ) { - return this.program.methods.requestRelay({ - maxFee: U64.to(maxFeeSol, LAMPORTS_PER_SOL), - gasDropoff: U64.to(gasDropoffEth, GWEI_PER_ETH), - }).accounts({ - payer, - instance: this.instance, - registeredChain: this.registeredChainPda(toChainId(chain)), - outboxItem, - relayRequest: this.relayRequestPda(outboxItem), - systemProgram: SystemProgram.programId, - }).instruction(); - } - - // ---- admin/assistant (=authority) relevant functions ---- - - async getInstance() { - const data = await this.program.account.instance.fetch(this.instance); - return { - owner: data.owner, - assistant: data.assistant, - feeRecipient: data.feeRecipient, - solPriceUsd: U64.from(data.solPrice, USD_UNIT), - }; - } - - async getRegisteredChain(chain: Chain) { - const data = await this.program.account.registeredChain.fetch( - this.registeredChainPda(toChainId(chain)) - ); - - return { - paused: data.basePrice.eq(U64.MAX), - maxGasDropoffEth: U64.from(data.maxGasDropoff, GWEI_PER_ETH), - basePriceUsd: U64.from(data.basePrice, USD_UNIT ), - nativePriceUsd: U64.from(data.nativePrice, USD_UNIT ), - gasPriceGwei: U64.from(data.gasPrice, WEI_PER_GWEI), - }; - } - - async getRegisteredNtt(nttProgramId: PublicKey) { - const data = await this.program.account.registeredNtt.fetch( - this.registeredNttPda(nttProgramId) - ); - - return { - gasCost: data.gasCost, - wormholeTransceiverIndex: data.wormholeTransceiverIndex, - }; - } - - //returns null if no relay was requested, otherwise it the requested gas dropoff (in eth), - // which can be 0, so a strict === null check is required! - async wasRelayRequested(outboxItem: PublicKey) { - const relayRequest = await this.program.account.relayRequest.fetchNullable( - this.relayRequestPda(outboxItem) - ); - - return relayRequest ? U64.from(relayRequest.requestedGasDropoff, GWEI_PER_ETH) : null; - } - - async createInitalizeInstruction(feeRecipient: PublicKey) { - if(!this.program.account.instance.fetchNullable(this.instance)) - throw new Error("Already initialized"); - - const programData = programDataAddress(this.program.programId); - - const accInfo = await this.program.provider.connection.getAccountInfo(programData); - if (!accInfo) - throw new Error("Could not find program data account"); - - const deserProgramData = deserializeLayout(programDataLayout, accInfo.data); - if (!deserProgramData.upgradeAuthority.isSome) - throw new Error("Could not determine program owner from program data."); - - return this.program.methods.initialize().accounts({ - owner: deserProgramData.upgradeAuthority.value, - instance: this.instance, - feeRecipient, - programData, - systemProgram: SystemProgram.programId, - }).instruction(); - } - - async createSetAssistantInstruction(assistant: PublicKey) { - const {owner, assistant: currentAssistant} = await this.getInstance(); - if (currentAssistant.equals(assistant)) - throw new Error("Is already assistant"); - - return this.program.methods.setAssistant().accounts({ - owner, - instance: this.instance, - assistant, - }).instruction(); - } - - async createSetFeeRecipientInstruction(feeRecipient: PublicKey) { - if (feeRecipient.equals(PublicKey.default)) - throw new Error("Fee recipient cannot be default public key"); - - const {owner, feeRecipient: currentFeeRecipient} = await this.getInstance(); - if (currentFeeRecipient.equals(feeRecipient)) - throw new Error("Is already feeRecipient"); - - return this.program.methods.setFeeRecipient().accounts({ - owner, - instance: this.instance, - feeRecipient, - }).instruction(); - } - - async createRegisterChainInstruction(authority: PublicKey, chain: Chain) { - const chainId = toChainId(chain); - return this.program.methods.registerChain({chainId}).accounts({ - authority, - instance: this.instance, - registeredChain: this.registeredChainPda(chainId), - systemProgram: SystemProgram.programId, - }).instruction(); - } - - async createRegisterNttInstruction( - authority: PublicKey, - nttProgramId: PublicKey, - gasCost: number, - wormholeTransceiverIndex: number, - ) { - return this.program.methods.registerNtt({ - nttProgramId, - gasCost, - wormholeTransceiverIndex, - }).accounts({ - authority, - instance: this.instance, - registeredNtt: this.registeredNttPda(nttProgramId), - systemProgram: SystemProgram.programId, - }).instruction(); - } - - async createDeregisterNttInstruction( - authority: PublicKey, - nttProgramId: PublicKey, - ) { - return this.program.methods.deregisterNtt({ nttProgramId }).accounts({ - authority, - instance: this.instance, - registeredNtt: this.registeredNttPda(nttProgramId), - systemProgram: SystemProgram.programId, - }).instruction(); - } - - async createUpdateSolPriceInstruction(authority: PublicKey, solPriceUsd: number) { - return this.program.methods.updateSolPrice({ - solPrice: U64.to(solPriceUsd, USD_UNIT), - }).accounts({ - authority, - instance: this.instance, - }).instruction(); - } - - async createUpdateChainParamsInstruction( - authority: PublicKey, - chain: Chain, - maxGasDropoffEth: number, - basePriceUsd: number, - ) { - return this.program.methods.updateChainParams({ - maxGasDropoff: U64.to(maxGasDropoffEth, GWEI_PER_ETH), - basePrice: U64.to(basePriceUsd, USD_UNIT ), - }).accounts({ - authority, - instance: this.instance, - registeredChain: this.registeredChainPda(toChainId(chain)), - }).instruction(); - } - - async createPauseRelayForChainInstruction(authority: PublicKey, chain: Chain) { - return this.program.methods.updateChainParams({ - maxGasDropoff: U64.to(0, 1), - basePrice: U64.MAX, - }).accounts({ - authority, - instance: this.instance, - registeredChain: this.registeredChainPda(toChainId(chain)), - }).instruction(); - } - - async createUpdateChainPricesInstruction( - authority: PublicKey, - chain: Chain, - nativePriceUsd: number, - gasPriceGwei: number, - ) { - return this.program.methods.updateChainPrices({ - nativePrice: U64.to(nativePriceUsd, USD_UNIT), - gasPrice: U64.to(gasPriceGwei, WEI_PER_GWEI), - }).accounts({ - authority, - instance: this.instance, - registeredChain: this.registeredChainPda(toChainId(chain)), - }).instruction(); - } - - async createCloseRelayInstruction(authority: PublicKey, outboxItem: PublicKey) { - return this.program.methods.closeRelay().accounts({ - authority, - instance: this.instance, - relayRequest: this.relayRequestPda(outboxItem), - }).instruction(); - } - - // ---- private ---- - - private registeredChainPda(chainId: number) { - return derivePda( - [SEED_PREFIX_REGISTERED_CHAIN, chainIdToBeBytes(chainId)], - this.program.programId - ); - } - - private registeredNttPda(nttProgramId: PublicKey) { - return derivePda( - [SEED_PREFIX_REGISTERED_NTT, nttProgramId.toBytes()], - this.program.programId - ); - } - - private relayRequestPda(outboxItem: PublicKey) { - return derivePda( - [SEED_PREFIX_RELAY_REQUEST, outboxItem.toBytes()], - this.program.programId - ); - } -} diff --git a/solana/ts/sdk/utils.ts b/solana/ts/sdk/utils.ts deleted file mode 100644 index 759be3b25..000000000 --- a/solana/ts/sdk/utils.ts +++ /dev/null @@ -1,64 +0,0 @@ -import { - Layout, - CustomConversion, - encoding, -} from "@wormhole-foundation/sdk-base"; - -import { PublicKey, PublicKeyInitData } from "@solana/web3.js"; -import { BN } from "@coral-xyz/anchor"; - -const CHAIN_ID_BYTE_SIZE = 2; -export const chainIdToBeBytes = chainId => encoding.bignum.toBytes(chainId, CHAIN_ID_BYTE_SIZE); - -export const BPF_LOADER_UPGRADEABLE_PROGRAM_ID = - new PublicKey("BPFLoaderUpgradeab1e11111111111111111111111"); - -export function programDataAddress(programId: PublicKeyInitData) { - return PublicKey.findProgramAddressSync( - [new PublicKey(programId).toBytes()], - BPF_LOADER_UPGRADEABLE_PROGRAM_ID, - )[0]; -} - -export const pubKeyConversion = { - to: (encoded: Uint8Array) => new PublicKey(encoded), - from: (decoded: PublicKey) => decoded.toBytes(), -} as const satisfies CustomConversion; - -//neither anchor nor solana web3 have a built-in way to parse this, because ofc they don't -export const programDataLayout = [ - { name: "slot", binary: "uint", endianness: "little", size: 8 }, - { name: "upgradeAuthority", binary: "switch", idSize: 1, idTag: "isSome", layouts: [ - [[0, false], []], - [[1, true], [{name: "value", binary: "bytes", size: 32, custom: pubKeyConversion}]], - ], - } -] as const satisfies Layout; - -export const U64 = { - MAX: new BN((2n**64n - 1n).toString()), - to: (amount: number, unit: number) => { - const ret = new BN(Math.round(amount * unit)); - - if (ret.isNeg()) - throw new Error("Value negative"); - - if (ret.bitLength() > 64) - throw new Error("Value too large"); - - return ret; - }, - from: (amount: BN, unit: number) => amount.toNumber() / unit, -}; - -type Seed = Uint8Array | string; -export function derivePda( - seeds: Seed | readonly Seed[], - programId: PublicKeyInitData -) { - const toBytes = (s: string | Uint8Array) => typeof s === "string" ? encoding.bytes.encode(s) : s; - return PublicKey.findProgramAddressSync( - Array.isArray(seeds) ? seeds.map(toBytes) : [toBytes(seeds as Seed)], - new PublicKey(programId), - )[0]; -} \ No newline at end of file diff --git a/solana/ts/sdk/utils/wormhole.ts b/solana/ts/sdk/utils/wormhole.ts deleted file mode 100644 index b7c6aabc7..000000000 --- a/solana/ts/sdk/utils/wormhole.ts +++ /dev/null @@ -1,19 +0,0 @@ - -import { postVaaSolana } from "@certusone/wormhole-sdk"; -import { NodeWallet } from "@certusone/wormhole-sdk/lib/cjs/solana"; -import * as anchor from "@coral-xyz/anchor"; - -export async function postVaa( - connection: anchor.web3.Connection, - payer: anchor.web3.Keypair, - vaaBuf: Buffer, - coreBridgeAddress: anchor.web3.PublicKey, -) { - await postVaaSolana( - connection, - new NodeWallet(payer).signTransaction, - coreBridgeAddress, - payer.publicKey, - vaaBuf, - ); -} diff --git a/solana/tsconfig.anchor.json b/solana/tsconfig.anchor.json new file mode 100644 index 000000000..b162e5675 --- /dev/null +++ b/solana/tsconfig.anchor.json @@ -0,0 +1,13 @@ +{ + "extends": "../tsconfig.json", + "include": ["ts/sdk/**/*.ts", "ts/sdk/**/*.json"], + "exclude": ["jest.config.js"], + "compilerOptions": { + "outDir": "dist/esm", + "rootDir": "ts/sdk", + "resolveJsonModule": true, + "noUnusedLocals": false, + "allowUnreachableCode": true, + "allowUnusedLabels": true, + } +} diff --git a/solana/tsconfig.cjs.json b/solana/tsconfig.cjs.json new file mode 100644 index 000000000..9b9cc3238 --- /dev/null +++ b/solana/tsconfig.cjs.json @@ -0,0 +1,12 @@ +{ + "extends": "../tsconfig.json", + "include": ["ts/index.ts", "ts/sdk/**/*.ts", "ts/sdk/**/*.json", "ts/lib/**/*.ts", "ts/idl/**/*.ts", "ts/idl/**/*.json"], + "exclude": ["jest.config.ts"], + "compilerOptions": { + "module": "CommonJS", + "moduleResolution": "node", + "outDir": "dist/cjs", + "rootDir": ".", + "resolveJsonModule": true + } +} diff --git a/solana/tsconfig.esm.json b/solana/tsconfig.esm.json new file mode 100644 index 000000000..d4c589314 --- /dev/null +++ b/solana/tsconfig.esm.json @@ -0,0 +1,10 @@ +{ + "extends": "../tsconfig.json", + "include": ["ts/index.ts", "ts/sdk/**/*.ts", "ts/sdk/**/*.json", "ts/lib/**/*.ts", "ts/idl/**/*.ts", "ts/idl/**/*.json"], + "exclude": ["jest.config.ts"], + "compilerOptions": { + "outDir": "dist/esm", + "rootDir": ".", + "resolveJsonModule": true + } +} diff --git a/solana/tsconfig.json b/solana/tsconfig.json deleted file mode 100644 index ab2be1768..000000000 --- a/solana/tsconfig.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "compilerOptions": { - "types": ["mocha", "chai"], - "typeRoots": ["./node_modules/@types"], - "lib": ["es2020"], - "module": "commonjs", - "target": "es2020", - "esModuleInterop": true, - "resolveJsonModule": true, - "noErrorTruncation": true, - "strictNullChecks": true - } -} diff --git a/sdk/tsconfig.json b/tsconfig.json similarity index 100% rename from sdk/tsconfig.json rename to tsconfig.json diff --git a/sdk/tsconfig.test.json b/tsconfig.test.json similarity index 87% rename from sdk/tsconfig.test.json rename to tsconfig.test.json index fa74e80c8..f2f32ad8b 100644 --- a/sdk/tsconfig.test.json +++ b/tsconfig.test.json @@ -1,6 +1,5 @@ { "extends": "./tsconfig.json", - "include": ["src/**/*.ts"], "compilerOptions": { "module": "NodeNext", "moduleResolution": "NodeNext",