diff --git a/connect/src/protocols/tokenTransfer.ts b/connect/src/protocols/tokenTransfer.ts index 97fcf030f..162664038 100644 --- a/connect/src/protocols/tokenTransfer.ts +++ b/connect/src/protocols/tokenTransfer.ts @@ -185,7 +185,6 @@ export class TokenTransfer const fromChain = this.wh.getChain(this.transfer.from.chain); this.txids = await TokenTransfer.transfer(fromChain, this.transfer, signer); this._state = TransferState.SourceInitiated; - return this.txids.map(({ txid }) => txid); } @@ -225,7 +224,6 @@ export class TokenTransfer timeout, ); } - this._state = TransferState.Attested; return this.attestations.map((vaa) => vaa.id); } @@ -254,8 +252,8 @@ export class TokenTransfer attestation as TokenTransferVAA, signer, ); - this.txids.push(...redeemTxids); + this._state = TransferState.DestinationInitiated; return redeemTxids.map(({ txid }) => txid); } @@ -369,7 +367,7 @@ export class TokenTransfer const tb = await srcChain.getTokenBridge(); // otherwise, check to see if it is a wrapped token locally lookup = await tb.getOriginalAsset(token.address); - } catch { + } catch (e) { // not a from-chain native wormhole-wrapped one lookup = token; } diff --git a/core/base/src/constants/rpc.ts b/core/base/src/constants/rpc.ts index 20b27aa42..55bc40b86 100644 --- a/core/base/src/constants/rpc.ts +++ b/core/base/src/constants/rpc.ts @@ -23,6 +23,7 @@ const rpcConfig = [[ ["Wormchain", "https://wormchain-rpc.quickapi.com"], ["Xpla", "https://dimension-rpc.xpla.dev"], ["Sei", "https://sei-rpc.polkachu.com/"], + ["Algorand", "https://mainnet-api.algonode.cloud"], ]], [ "Testnet", [ ["Ethereum", "https://rpc.ankr.com/eth_goerli"], @@ -44,7 +45,8 @@ const rpcConfig = [[ ["Evmos", "https://evmos-testnet-rpc.polkachu.com"], ["Wormchain", "https://gateway.testnet.xlabs.xyz/"], ["Xpla", "https://cube-rpc.xpla.dev"], - ["Sepolia", "https://ethereum-sepolia.publicnode.com"] + ["Sepolia", "https://ethereum-sepolia.publicnode.com"], + ["Algorand", "https://testnet-api.algonode.cloud"], ]], [ "Devnet", [ ["Ethereum", "http://eth-devnet:8545"], diff --git a/core/base/src/utils/encoding.ts b/core/base/src/utils/encoding.ts index 30712bc49..4ed7d2b18 100644 --- a/core/base/src/utils/encoding.ts +++ b/core/base/src/utils/encoding.ts @@ -32,21 +32,34 @@ export const b58 = { }; export const bignum = { - decode: (input: string | Uint8Array) => - typeof input === "string" ? BigInt(input) : BigInt(hex.encode(input, true)), - encode: (input: bigint, prefix: boolean = false) => (prefix ? "0x" : "") + input.toString(16), + decode: (input: string | Uint8Array) => { + if (typeof input !== "string") input = hex.encode(input, true); + if (input === "" || input === "0x") return 0n; + return BigInt(input); + }, + encode: (input: bigint, prefix: boolean = false) => bignum.toString(input, prefix), + toString: (input: bigint, prefix: boolean = false) => { + let str = input.toString(16); + str = str.length % 2 === 1 ? (str = "0" + str) : str; + if (prefix) return "0x" + str; + return str; + }, + toBytes: (input: bigint | number, length?: number) => { + const b = hex.decode(bignum.toString(typeof input === "number" ? BigInt(input) : input)); + if (!length) return b; + return bytes.zpad(b, length); + }, }; export const bytes = { - encode: (value: string | bigint): Uint8Array => - typeof value === "bigint" - ? bytes.encode(bignum.encode(value)) - : new TextEncoder().encode(value), + encode: (value: string): Uint8Array => new TextEncoder().encode(value), decode: (value: Uint8Array): string => new TextDecoder().decode(value), equals: (lhs: Uint8Array, rhs: Uint8Array): boolean => lhs.length === rhs.length && lhs.every((v, i) => v === rhs[i]), - zpad: (arr: Uint8Array, length: number): Uint8Array => - bytes.concat(new Uint8Array(length - arr.length), arr), + zpad: (arr: Uint8Array, length: number, padStart: boolean = true): Uint8Array => + padStart + ? bytes.concat(new Uint8Array(length - arr.length), arr) + : bytes.concat(arr, new Uint8Array(length - arr.length)), concat: (...args: Uint8Array[]): Uint8Array => { const length = args.reduce((acc, curr) => acc + curr.length, 0); const result = new Uint8Array(length); diff --git a/core/definitions/src/universalAddress.ts b/core/definitions/src/universalAddress.ts index d4525fa2a..10a00d41d 100644 --- a/core/definitions/src/universalAddress.ts +++ b/core/definitions/src/universalAddress.ts @@ -16,7 +16,7 @@ const algorandAppIdLayout = [ export class UniversalAddress implements Address { static readonly byteSize = 32; - readonly type: string = "Universal"; + static readonly type: string = "Universal"; private readonly address: Uint8Array; @@ -50,9 +50,12 @@ export class UniversalAddress implements Address { return !throws(() => UniversalAddress.stringToUint8Array(address, format)); } - //TODO isn't this quite the code smell? - why would we have to test an any? static instanceof(address: any): address is UniversalAddress { - return typeof address === "object" && "type" in address && address.type === "Universal"; + return ( + typeof address === "object" && + "constructor" in address && + address.constructor.type === "Universal" + ); } private static stringToUint8Array(address: string, format: PlatformAddressFormat): Uint8Array { diff --git a/examples/package.json b/examples/package.json index 1ad4c974a..372851bbe 100644 --- a/examples/package.json +++ b/examples/package.json @@ -33,6 +33,7 @@ }, "sideEffects": false, "scripts": { + "wrapped": "tsx src/createWrapped.ts", "tb": "tsx src/tokenBridge.ts", "cctp": "tsx src/cctp.ts", "demo": "tsx src/index.ts", @@ -46,7 +47,8 @@ "docs": "typedoc" }, "devDependencies": { - "dotenv": "^16.3.1" + "dotenv": "^16.3.1", + "tsx": "^4.7.0" }, "dependencies": { "@wormhole-foundation/connect-sdk": "^0.3.0-beta.6", @@ -61,6 +63,7 @@ "@wormhole-foundation/connect-sdk-cosmwasm-tokenbridge": "^0.3.0-beta.6", "@wormhole-foundation/connect-sdk-evm-cctp": "^0.3.0-beta.6", "@wormhole-foundation/connect-sdk-solana-cctp": "^0.3.0-beta.6", - "@wormhole-foundation/connect-sdk-cosmwasm-ibc": "^0.3.0-beta.6" + "@wormhole-foundation/connect-sdk-cosmwasm-ibc": "^0.3.0-beta.6", + "algosdk": "^2.7.0" } } \ No newline at end of file diff --git a/examples/src/createWrapped.ts b/examples/src/createWrapped.ts new file mode 100644 index 000000000..ea904cbef --- /dev/null +++ b/examples/src/createWrapped.ts @@ -0,0 +1,91 @@ +import { TokenId, Wormhole, signSendWait } from "@wormhole-foundation/connect-sdk"; +import { AlgorandPlatform } from "@wormhole-foundation/connect-sdk-algorand"; +import { SolanaPlatform } from "@wormhole-foundation/connect-sdk-solana"; +import { getStuff } from "./helpers"; + +import "@wormhole-foundation/connect-sdk-algorand-tokenbridge"; +import "@wormhole-foundation/connect-sdk-solana-tokenbridge"; + +(async function () { + const wh = new Wormhole("Testnet", [AlgorandPlatform, SolanaPlatform]); + + // Original Token to Attest + const token: TokenId = Wormhole.chainAddress("Algorand", "10458941"); + + // grab context and signer + const origChain = wh.getChain(token.chain); + const { signer: origSigner } = await getStuff(origChain); + + // Note: if the VAA is not produced before the attempt to retrieve it times out + // you should set this value to the txid logged in the previous run + let txid = undefined; + // txid = "0x55127b9c8af46aaeea9ef28d8bf91e1aff920422fc1c9831285eb0f39ddca2fe"; + + txid = "FPNHIFFUZDVPT5SATZQZZ7DFGZMPCCHEFBCB5EZQJV4RRK3ZYTVA"; + txid = "GWZU432ERFU3NES4MA7IAAP6DX73F5VRSSIWGJVC5JRHOH6UMWEQ"; + + if (!txid) { + // create attestation from origin chain, the same VAA + // can be used across all chains + const tb = await origChain.getTokenBridge(); + const attestTxns = tb.createAttestation( + token.address, + Wormhole.parseAddress(origSigner.chain(), origSigner.address()), + ); + const txids = await signSendWait(origChain, attestTxns, origSigner); + txid = txids[0].txid; + console.log("Created attestation (save this): ", txid); + } + + // Get the wormhole message id from the transaction logs + const msgs = await origChain.parseTransaction(txid); + console.log(msgs); + + // Get the Signed VAA from the API + const timeout = 60_000; // 60 seconds + const vaa = await wh.getVaa(msgs[0], "TokenBridge:AttestMeta", timeout); + if (!vaa) throw new Error("VAA not found after retries exhausted, try extending the timeout"); + + console.log(vaa.payload.token.address); + + // Check if its attested and if not + // submit the attestation to the token bridge on the + // destination chain + const chain = "Solana"; + const destChain = wh.getChain(chain); + const { signer } = await getStuff(destChain); + + // grab a ref to the token bridge + const tb = await destChain.getTokenBridge(); + try { + // try to get the wrapped version, an error here likely means + // its not been attested + const wrapped = await tb.getWrappedAsset(token); + console.log("already wrapped"); + return { chain, address: wrapped }; + } catch (e) {} + + // no wrapped asset, needs to be attested + console.log("attesting asset"); + await signSendWait( + destChain, + tb.submitAttestation(vaa, Wormhole.parseAddress(signer.chain(), signer.address())), + signer, + ); + + async function waitForIt() { + do { + // check again + try { + const wrapped = await tb.getWrappedAsset(token); + return { chain, address: wrapped }; + } catch (e) { + console.error(e); + } + console.log("Waiting before checking again..."); + await new Promise((r) => setTimeout(r, 2000)); + } while (true); + } + + console.log("wrapped: ", await waitForIt()); +})(); diff --git a/examples/src/helpers/helpers.ts b/examples/src/helpers/helpers.ts index 79fb47d15..121bdf8fd 100644 --- a/examples/src/helpers/helpers.ts +++ b/examples/src/helpers/helpers.ts @@ -15,9 +15,10 @@ import { } from "@wormhole-foundation/connect-sdk"; // Importing from src so we dont have to rebuild to see debug stuff in signer -import { getCosmwasmSigner } from "@wormhole-foundation/connect-sdk-cosmwasm/src/testing"; import { getEvmSigner } from "@wormhole-foundation/connect-sdk-evm/src/testing"; import { getSolanaSigner } from "@wormhole-foundation/connect-sdk-solana/src/testing"; +import { getCosmwasmSigner } from "@wormhole-foundation/connect-sdk-cosmwasm/src/testing"; +import { getAlgorandSigner } from "@wormhole-foundation/connect-sdk-algorand/src/testing"; // read in from `.env` require("dotenv").config(); @@ -60,6 +61,9 @@ export async function getStuff< case "Evm": signer = await getEvmSigner(await chain.getRpc(), getEnv("ETH_PRIVATE_KEY")); break; + case "Algorand": + signer = await getAlgorandSigner(await chain.getRpc(), getEnv("ALGORAND_MNEMONIC")); + break; default: throw new Error("Unrecognized platform: " + platform); } diff --git a/examples/src/messaging.ts b/examples/src/messaging.ts index c4fbe2bed..07ed2cabc 100644 --- a/examples/src/messaging.ts +++ b/examples/src/messaging.ts @@ -1,14 +1,14 @@ import { Wormhole, encoding, signSendWait } from "@wormhole-foundation/connect-sdk"; -import { SolanaPlatform } from "@wormhole-foundation/connect-sdk-solana"; +import { AlgorandPlatform } from "@wormhole-foundation/connect-sdk-algorand"; import { getStuff } from "./helpers"; // register the protocol -import "@wormhole-foundation/connect-sdk-solana-core"; +import "@wormhole-foundation/connect-sdk-algorand-core"; (async function () { - const wh = new Wormhole("Testnet", [SolanaPlatform]); + const wh = new Wormhole("Testnet", [AlgorandPlatform]); - const chain = wh.getChain("Solana"); + const chain = wh.getChain("Algorand"); const { signer, address } = await getStuff(chain); // Get a reference to the core messaging bridge @@ -16,19 +16,24 @@ import "@wormhole-foundation/connect-sdk-solana-core"; // Generate transactions, sign and send them const publishTxs = coreBridge.publishMessage(address.address, encoding.bytes.encode("lol"), 0, 0); - const [txid] = await signSendWait(chain, publishTxs, signer); + const txids = await signSendWait(chain, publishTxs, signer); - // Grab the wormhole message from the transaction logs or storage + // Take the last txid in case multiple were sent + // the last one should be the one containing the relevant + // event or log info + const txid = txids[txids.length - 1]; + + // // Grab the wormhole message from the transaction logs or storage const [whm] = await chain.parseTransaction(txid!.txid); - // Wait for the vaa with a timeout, + // // Wait for the vaa with a timeout, const vaa = await wh.getVaa(whm!, "Uint8Array", 60_000); console.log(vaa); // can also search by txid but it takes longer to show up // console.log(await wh.getVaaByTxHash(txid!.txid, "Uint8Array")); const verifyTxs = coreBridge.verifyMessage(address.address, vaa!); - await signSendWait(chain, verifyTxs, signer); + console.log(await signSendWait(chain, verifyTxs, signer)); // reposting the vaa should result in 0 transactions being issued // assuming you're reading your writes diff --git a/examples/src/tokenBridge.ts b/examples/src/tokenBridge.ts index 51290d518..49289067c 100644 --- a/examples/src/tokenBridge.ts +++ b/examples/src/tokenBridge.ts @@ -13,22 +13,26 @@ import { TransferStuff, getStuff, waitLog } from "./helpers"; // Import the platform specific packages import { EvmPlatform } from "@wormhole-foundation/connect-sdk-evm"; import { SolanaPlatform } from "@wormhole-foundation/connect-sdk-solana"; +import { AlgorandPlatform } from "@wormhole-foundation/connect-sdk-algorand"; // Register the protocols import "@wormhole-foundation/connect-sdk-evm-tokenbridge"; import "@wormhole-foundation/connect-sdk-solana-tokenbridge"; +import "@wormhole-foundation/connect-sdk-algorand-tokenbridge"; (async function () { // init Wormhole object, passing config for which network // to use (e.g. Mainnet/Testnet) and what Platforms to support - const wh = new Wormhole("Testnet", [EvmPlatform, SolanaPlatform]); + const wh = new Wormhole("Testnet", [EvmPlatform, SolanaPlatform, AlgorandPlatform]); // Grab chain Contexts -- these hold a reference to a cached rpc client - const sendChain = wh.getChain("Avalanche"); + const sendChain = wh.getChain("Algorand"); const rcvChain = wh.getChain("Solana"); // shortcut to allow transferring native gas token - const token: TokenId<"Avalanche"> | "native" = "native"; + const token: TokenId | "native" = "native"; + + // const token = Wormhole.chainAddress("Algorand", "10458941"); // USDC on Algorand // A TokenId is just a `{chain, address}` pair and an alias for ChainAddress // The `address` field must be a parsed address. @@ -41,7 +45,7 @@ import "@wormhole-foundation/connect-sdk-solana-tokenbridge"; // Note: The Token bridge will dedust past 8 decimals // this means any amount specified past that point will be returned // to the caller - const amount = "0.15"; + const amount = "0.001"; // With automatic set to true, perform an automatic transfer. This will invoke a relayer // contract intermediary that knows to pick up the transfers diff --git a/package-lock.json b/package-lock.json index cdd48365e..c76c6d746 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,11 +19,13 @@ "platforms/solana", "platforms/solana/protocols/core", "platforms/solana/protocols/tokenBridge", - "platforms/solana/protocols/cctp", "platforms/cosmwasm", "platforms/cosmwasm/protocols/core", "platforms/cosmwasm/protocols/tokenBridge", "platforms/cosmwasm/protocols/ibc", + "platforms/algorand", + "platforms/algorand/protocols/core", + "platforms/algorand/protocols/tokenBridge", "examples" ], "devDependencies": { @@ -73,23 +75,6 @@ "@wormhole-foundation/sdk-base": "^0.3.0-beta.6" } }, - "core/tokenRegistry": { - "name": "@wormhole-foundation/sdk-token-registry", - "version": "0.2.6-beta.1", - "extraneous": true, - "dependencies": { - "@wormhole-foundation/connect-sdk": "^0.2.6-beta.1", - "@wormhole-foundation/connect-sdk-cosmwasm": "^0.2.6-beta.1", - "@wormhole-foundation/connect-sdk-cosmwasm-core": "^0.2.6-beta.1", - "@wormhole-foundation/connect-sdk-cosmwasm-tokenbridge": "^0.2.6-beta.1", - "@wormhole-foundation/connect-sdk-evm": "^0.2.6-beta.1", - "@wormhole-foundation/connect-sdk-evm-core": "^0.2.6-beta.1", - "@wormhole-foundation/connect-sdk-evm-tokenbridge": "^0.2.6-beta.1", - "@wormhole-foundation/connect-sdk-solana": "^0.2.6-beta.1", - "@wormhole-foundation/connect-sdk-solana-core": "^0.2.6-beta.1", - "@wormhole-foundation/connect-sdk-solana-tokenbridge": "^0.2.6-beta.1" - } - }, "examples": { "name": "@wormhole-foundation/connect-sdk-examples", "version": "0.3.0-beta.6", @@ -107,10 +92,12 @@ "@wormhole-foundation/connect-sdk-solana": "^0.3.0-beta.6", "@wormhole-foundation/connect-sdk-solana-cctp": "^0.3.0-beta.6", "@wormhole-foundation/connect-sdk-solana-core": "^0.3.0-beta.6", - "@wormhole-foundation/connect-sdk-solana-tokenbridge": "^0.3.0-beta.6" + "@wormhole-foundation/connect-sdk-solana-tokenbridge": "^0.3.0-beta.6", + "algosdk": "^2.7.0" }, "devDependencies": { - "dotenv": "^16.3.1" + "dotenv": "^16.3.1", + "tsx": "^4.7.0" }, "engines": { "node": ">=16" @@ -133,16 +120,16 @@ } }, "node_modules/@apollo/client": { - "version": "3.8.7", - "license": "MIT", + "version": "3.8.8", + "resolved": "https://registry.npmjs.org/@apollo/client/-/client-3.8.8.tgz", + "integrity": "sha512-omjd9ryGDkadZrKW6l5ktUAdS4SNaFOccYQ4ZST0HLW83y8kQaSZOCTNlpkoBUK8cv6qP8+AxOKwLm2ho8qQ+Q==", "dependencies": { "@graphql-typed-document-node/core": "^3.1.1", - "@wry/context": "^0.7.3", "@wry/equality": "^0.5.6", - "@wry/trie": "^0.4.3", + "@wry/trie": "^0.5.0", "graphql-tag": "^2.12.6", "hoist-non-react-statics": "^3.3.2", - "optimism": "^0.17.5", + "optimism": "^0.18.0", "prop-types": "^15.7.2", "response-iterator": "^0.2.6", "symbol-observable": "^4.0.0", @@ -172,13 +159,6 @@ } } }, - "node_modules/@apollo/client/node_modules/symbol-observable": { - "version": "4.0.0", - "license": "MIT", - "engines": { - "node": ">=0.10" - } - }, "node_modules/@babel/code-frame": { "version": "7.23.4", "dev": true, @@ -791,7 +771,8 @@ }, "node_modules/@confio/ics23": { "version": "0.6.8", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@confio/ics23/-/ics23-0.6.8.tgz", + "integrity": "sha512-wB6uo+3A50m0sW/EWcU64xpV/8wShZ6bMTa7pF8eYsTrSkQA7oLUIJcs/wb8g4y2Oyq701BaGiO6n/ak5WXO1w==", "dependencies": { "@noble/hashes": "^1.0.0", "protobufjs": "^6.8.8" @@ -812,38 +793,41 @@ } }, "node_modules/@cosmjs/amino": { - "version": "0.32.1", - "license": "Apache-2.0", + "version": "0.32.2", + "resolved": "https://registry.npmjs.org/@cosmjs/amino/-/amino-0.32.2.tgz", + "integrity": "sha512-lcK5RCVm4OfdAooxKcF2+NwaDVVpghOq6o/A40c2mHXDUzUoRZ33VAHjVJ9Me6vOFxshrw/XEFn1f4KObntjYA==", "dependencies": { - "@cosmjs/crypto": "^0.32.1", - "@cosmjs/encoding": "^0.32.1", - "@cosmjs/math": "^0.32.1", - "@cosmjs/utils": "^0.32.1" + "@cosmjs/crypto": "^0.32.2", + "@cosmjs/encoding": "^0.32.2", + "@cosmjs/math": "^0.32.2", + "@cosmjs/utils": "^0.32.2" } }, "node_modules/@cosmjs/cosmwasm-stargate": { - "version": "0.32.1", - "license": "Apache-2.0", - "dependencies": { - "@cosmjs/amino": "^0.32.1", - "@cosmjs/crypto": "^0.32.1", - "@cosmjs/encoding": "^0.32.1", - "@cosmjs/math": "^0.32.1", - "@cosmjs/proto-signing": "^0.32.1", - "@cosmjs/stargate": "^0.32.1", - "@cosmjs/tendermint-rpc": "^0.32.1", - "@cosmjs/utils": "^0.32.1", + "version": "0.32.2", + "resolved": "https://registry.npmjs.org/@cosmjs/cosmwasm-stargate/-/cosmwasm-stargate-0.32.2.tgz", + "integrity": "sha512-OwJHzIx2CoJS6AULxOpNR6m+CI0GXxy8z9svHA1ZawzNM3ZGlL0GvHdhmF0WkpX4E7UdrYlJSLpKcgg5Fo6i7Q==", + "dependencies": { + "@cosmjs/amino": "^0.32.2", + "@cosmjs/crypto": "^0.32.2", + "@cosmjs/encoding": "^0.32.2", + "@cosmjs/math": "^0.32.2", + "@cosmjs/proto-signing": "^0.32.2", + "@cosmjs/stargate": "^0.32.2", + "@cosmjs/tendermint-rpc": "^0.32.2", + "@cosmjs/utils": "^0.32.2", "cosmjs-types": "^0.9.0", "pako": "^2.0.2" } }, "node_modules/@cosmjs/crypto": { - "version": "0.32.1", - "license": "Apache-2.0", + "version": "0.32.2", + "resolved": "https://registry.npmjs.org/@cosmjs/crypto/-/crypto-0.32.2.tgz", + "integrity": "sha512-RuxrYKzhrPF9g6NmU7VEq++Hn1vZJjqqJpZ9Tmw9lOYOV8BUsv+j/0BE86kmWi7xVJ7EwxiuxYsKuM8IR18CIA==", "dependencies": { - "@cosmjs/encoding": "^0.32.1", - "@cosmjs/math": "^0.32.1", - "@cosmjs/utils": "^0.32.1", + "@cosmjs/encoding": "^0.32.2", + "@cosmjs/math": "^0.32.2", + "@cosmjs/utils": "^0.32.2", "@noble/hashes": "^1", "bn.js": "^5.2.0", "elliptic": "^6.5.4", @@ -851,8 +835,9 @@ } }, "node_modules/@cosmjs/encoding": { - "version": "0.32.1", - "license": "Apache-2.0", + "version": "0.32.2", + "resolved": "https://registry.npmjs.org/@cosmjs/encoding/-/encoding-0.32.2.tgz", + "integrity": "sha512-WX7m1wLpA9V/zH0zRcz4EmgZdAv1F44g4dbXOgNj1eXZw1PIGR12p58OEkLN51Ha3S4DKRtCv5CkhK1KHEvQtg==", "dependencies": { "base64-js": "^1.3.0", "bech32": "^1.1.4", @@ -860,37 +845,41 @@ } }, "node_modules/@cosmjs/json-rpc": { - "version": "0.32.1", - "license": "Apache-2.0", + "version": "0.32.2", + "resolved": "https://registry.npmjs.org/@cosmjs/json-rpc/-/json-rpc-0.32.2.tgz", + "integrity": "sha512-lan2lOgmz4yVE/HR8eCOSiII/1OudIulk8836koyIDCsPEpt6eKBuctnAD168vABGArKccLAo7Mr2gy9nrKrOQ==", "dependencies": { - "@cosmjs/stream": "^0.32.1", + "@cosmjs/stream": "^0.32.2", "xstream": "^11.14.0" } }, "node_modules/@cosmjs/math": { - "version": "0.32.1", - "license": "Apache-2.0", + "version": "0.32.2", + "resolved": "https://registry.npmjs.org/@cosmjs/math/-/math-0.32.2.tgz", + "integrity": "sha512-b8+ruAAY8aKtVKWSft2IvtCVCUH1LigIlf9ALIiY8n9jtM4kMASiaRbQ/27etnSAInV88IaezKK9rQZrtxTjcw==", "dependencies": { "bn.js": "^5.2.0" } }, "node_modules/@cosmjs/proto-signing": { - "version": "0.32.1", - "license": "Apache-2.0", - "dependencies": { - "@cosmjs/amino": "^0.32.1", - "@cosmjs/crypto": "^0.32.1", - "@cosmjs/encoding": "^0.32.1", - "@cosmjs/math": "^0.32.1", - "@cosmjs/utils": "^0.32.1", + "version": "0.32.2", + "resolved": "https://registry.npmjs.org/@cosmjs/proto-signing/-/proto-signing-0.32.2.tgz", + "integrity": "sha512-UV4WwkE3W3G3s7wwU9rizNcUEz2g0W8jQZS5J6/3fiN0mRPwtPKQ6EinPN9ASqcAJ7/VQH4/9EPOw7d6XQGnqw==", + "dependencies": { + "@cosmjs/amino": "^0.32.2", + "@cosmjs/crypto": "^0.32.2", + "@cosmjs/encoding": "^0.32.2", + "@cosmjs/math": "^0.32.2", + "@cosmjs/utils": "^0.32.2", "cosmjs-types": "^0.9.0" } }, "node_modules/@cosmjs/socket": { - "version": "0.32.1", - "license": "Apache-2.0", + "version": "0.32.2", + "resolved": "https://registry.npmjs.org/@cosmjs/socket/-/socket-0.32.2.tgz", + "integrity": "sha512-Qc8jaw4uSBJm09UwPgkqe3g9TBFx4ZR9HkXpwT6Z9I+6kbLerXPR0Gy3NSJFSUgxIfTpO8O1yqoWAyf0Ay17Mw==", "dependencies": { - "@cosmjs/stream": "^0.32.1", + "@cosmjs/stream": "^0.32.2", "isomorphic-ws": "^4.0.1", "ws": "^7", "xstream": "^11.14.0" @@ -898,7 +887,8 @@ }, "node_modules/@cosmjs/socket/node_modules/ws": { "version": "7.5.9", - "license": "MIT", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", "engines": { "node": ">=8.3.0" }, @@ -916,47 +906,51 @@ } }, "node_modules/@cosmjs/stargate": { - "version": "0.32.1", - "license": "Apache-2.0", + "version": "0.32.2", + "resolved": "https://registry.npmjs.org/@cosmjs/stargate/-/stargate-0.32.2.tgz", + "integrity": "sha512-AsJa29fT7Jd4xt9Ai+HMqhyj7UQu7fyYKdXj/8+/9PD74xe6lZSYhQPcitUmMLJ1ckKPgXSk5Dd2LbsQT0IhZg==", "dependencies": { "@confio/ics23": "^0.6.8", - "@cosmjs/amino": "^0.32.1", - "@cosmjs/encoding": "^0.32.1", - "@cosmjs/math": "^0.32.1", - "@cosmjs/proto-signing": "^0.32.1", - "@cosmjs/stream": "^0.32.1", - "@cosmjs/tendermint-rpc": "^0.32.1", - "@cosmjs/utils": "^0.32.1", + "@cosmjs/amino": "^0.32.2", + "@cosmjs/encoding": "^0.32.2", + "@cosmjs/math": "^0.32.2", + "@cosmjs/proto-signing": "^0.32.2", + "@cosmjs/stream": "^0.32.2", + "@cosmjs/tendermint-rpc": "^0.32.2", + "@cosmjs/utils": "^0.32.2", "cosmjs-types": "^0.9.0", "xstream": "^11.14.0" } }, "node_modules/@cosmjs/stream": { - "version": "0.32.1", - "license": "Apache-2.0", + "version": "0.32.2", + "resolved": "https://registry.npmjs.org/@cosmjs/stream/-/stream-0.32.2.tgz", + "integrity": "sha512-gpCufLfHAD8Zp1ZKge7AHbDf4RA0TZp66wZY6JaQR5bSiEF2Drjtp4mwXZPGejtaUMnaAgff3LrUzPJfKYdQwg==", "dependencies": { "xstream": "^11.14.0" } }, "node_modules/@cosmjs/tendermint-rpc": { - "version": "0.32.1", - "license": "Apache-2.0", - "dependencies": { - "@cosmjs/crypto": "^0.32.1", - "@cosmjs/encoding": "^0.32.1", - "@cosmjs/json-rpc": "^0.32.1", - "@cosmjs/math": "^0.32.1", - "@cosmjs/socket": "^0.32.1", - "@cosmjs/stream": "^0.32.1", - "@cosmjs/utils": "^0.32.1", + "version": "0.32.2", + "resolved": "https://registry.npmjs.org/@cosmjs/tendermint-rpc/-/tendermint-rpc-0.32.2.tgz", + "integrity": "sha512-DXyJHDmcAfCix4H/7/dKR0UMdshP01KxJOXHdHxBCbLIpck94BsWD3B2ZTXwfA6sv98so9wOzhp7qGQa5malxg==", + "dependencies": { + "@cosmjs/crypto": "^0.32.2", + "@cosmjs/encoding": "^0.32.2", + "@cosmjs/json-rpc": "^0.32.2", + "@cosmjs/math": "^0.32.2", + "@cosmjs/socket": "^0.32.2", + "@cosmjs/stream": "^0.32.2", + "@cosmjs/utils": "^0.32.2", "axios": "^1.6.0", "readonly-date": "^1.0.0", "xstream": "^11.14.0" } }, "node_modules/@cosmjs/utils": { - "version": "0.32.1", - "license": "Apache-2.0" + "version": "0.32.2", + "resolved": "https://registry.npmjs.org/@cosmjs/utils/-/utils-0.32.2.tgz", + "integrity": "sha512-Gg5t+eR7vPJMAmhkFt6CZrzPd0EKpAslWwk5rFVYZpJsM8JG5KT9XQ99hgNM3Ov6ScNoIWbXkpX27F6A9cXR4Q==" }, "node_modules/@cspotcode/source-map-support": { "version": "0.8.1", @@ -980,14 +974,386 @@ }, "node_modules/@ensdomains/ens-validation": { "version": "0.1.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/@ensdomains/ens-validation/-/ens-validation-0.1.0.tgz", + "integrity": "sha512-rbDh2K6GfqXvBcJUISaTTYEt3f079WA4ohTE5Lh4/8EaaPAk/9vk3EisMUQV2UVxeFIZQEEyRCIOmRTpqN0W7A==" }, "node_modules/@ensdomains/eth-ens-namehash": { "version": "2.0.15", - "license": "ISC" + "resolved": "https://registry.npmjs.org/@ensdomains/eth-ens-namehash/-/eth-ens-namehash-2.0.15.tgz", + "integrity": "sha512-JRDFP6+Hczb1E0/HhIg0PONgBYasfGfDheujmfxaZaAv/NAH4jE6Kf48WbqfRZdxt4IZI3jl3Ri7sZ1nP09lgw==" + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.10.tgz", + "integrity": "sha512-Q+mk96KJ+FZ30h9fsJl+67IjNJm3x2eX+GBWGmocAKgzp27cowCOOqSdscX80s0SpdFXZnIv/+1xD1EctFx96Q==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.10.tgz", + "integrity": "sha512-7W0bK7qfkw1fc2viBfrtAEkDKHatYfHzr/jKAHNr9BvkYDXPcC6bodtm8AyLJNNuqClLNaeTLuwURt4PRT9d7w==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.10.tgz", + "integrity": "sha512-1X4CClKhDgC3by7k8aOWZeBXQX8dHT5QAMCAQDArCLaYfkppoARvh0fit3X2Qs+MXDngKcHv6XXyQCpY0hkK1Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.10.tgz", + "integrity": "sha512-O/nO/g+/7NlitUxETkUv/IvADKuZXyH4BHf/g/7laqKC4i/7whLpB0gvpPc2zpF0q9Q6FXS3TS75QHac9MvVWw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.10.tgz", + "integrity": "sha512-YSRRs2zOpwypck+6GL3wGXx2gNP7DXzetmo5pHXLrY/VIMsS59yKfjPizQ4lLt5vEI80M41gjm2BxrGZ5U+VMA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.10.tgz", + "integrity": "sha512-alfGtT+IEICKtNE54hbvPg13xGBe4GkVxyGWtzr+yHO7HIiRJppPDhOKq3zstTcVf8msXb/t4eavW3jCDpMSmA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.10.tgz", + "integrity": "sha512-dMtk1wc7FSH8CCkE854GyGuNKCewlh+7heYP/sclpOG6Cectzk14qdUIY5CrKDbkA/OczXq9WesqnPl09mj5dg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.10.tgz", + "integrity": "sha512-G5UPPspryHu1T3uX8WiOEUa6q6OlQh6gNl4CO4Iw5PS+Kg5bVggVFehzXBJY6X6RSOMS8iXDv2330VzaObm4Ag==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.10.tgz", + "integrity": "sha512-j6gUW5aAaPgD416Hk9FHxn27On28H4eVI9rJ4az7oCGTFW48+LcgNDBN+9f8rKZz7EEowo889CPKyeaD0iw9Kg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.10.tgz", + "integrity": "sha512-QxaouHWZ+2KWEj7cGJmvTIHVALfhpGxo3WLmlYfJ+dA5fJB6lDEIg+oe/0//FuyVHuS3l79/wyBxbHr0NgtxJQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.10.tgz", + "integrity": "sha512-4ub1YwXxYjj9h1UIZs2hYbnTZBtenPw5NfXCRgEkGb0b6OJ2gpkMvDqRDYIDRjRdWSe/TBiZltm3Y3Q8SN1xNg==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.10.tgz", + "integrity": "sha512-lo3I9k+mbEKoxtoIbM0yC/MZ1i2wM0cIeOejlVdZ3D86LAcFXFRdeuZmh91QJvUTW51bOK5W2BznGNIl4+mDaA==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.10.tgz", + "integrity": "sha512-J4gH3zhHNbdZN0Bcr1QUGVNkHTdpijgx5VMxeetSk6ntdt+vR1DqGmHxQYHRmNb77tP6GVvD+K0NyO4xjd7y4A==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.10.tgz", + "integrity": "sha512-tgT/7u+QhV6ge8wFMzaklOY7KqiyitgT1AUHMApau32ZlvTB/+efeCtMk4eXS+uEymYK249JsoiklZN64xt6oQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.10.tgz", + "integrity": "sha512-0f/spw0PfBMZBNqtKe5FLzBDGo0SKZKvMl5PHYQr3+eiSscfJ96XEknCe+JoOayybWUFQbcJTrk946i3j9uYZA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.10.tgz", + "integrity": "sha512-pZFe0OeskMHzHa9U38g+z8Yx5FNCLFtUnJtQMpwhS+r4S566aK2ci3t4NCP4tjt6d5j5uo4h7tExZMjeKoehAA==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.10.tgz", + "integrity": "sha512-SpYNEqg/6pZYoc+1zLCjVOYvxfZVZj6w0KROZ3Fje/QrM3nfvT2llI+wmKSrWuX6wmZeTapbarvuNNK/qepSgA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.10.tgz", + "integrity": "sha512-ACbZ0vXy9zksNArWlk2c38NdKg25+L9pr/mVaj9SUq6lHZu/35nx2xnQVRGLrC1KKQqJKRIB0q8GspiHI3J80Q==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.10.tgz", + "integrity": "sha512-PxcgvjdSjtgPMiPQrM3pwSaG4kGphP+bLSb+cihuP0LYdZv1epbAIecHVl5sD3npkfYBZ0ZnOjR878I7MdJDFg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.10.tgz", + "integrity": "sha512-ZkIOtrRL8SEJjr+VHjmW0znkPs+oJXhlJbNwfI37rvgeMtk3sxOQevXPXjmAPZPigVTncvFqLMd+uV0IBSEzqA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.10.tgz", + "integrity": "sha512-+Sa4oTDbpBfGpl3Hn3XiUe4f8TU2JF7aX8cOfqFYMMjXp6ma6NJDztl5FDG8Ezx0OjwGikIHw+iA54YLDNNVfw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.10.tgz", + "integrity": "sha512-EOGVLK1oWMBXgfttJdPHDTiivYSjX6jDNaATeNOaCOFEVcfMjtbx7WVQwPSE1eIfCp/CaSF2nSrDtzc4I9f8TQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.10.tgz", + "integrity": "sha512-whqLG6Sc70AbU73fFYvuYzaE4MNMBIlR1Y/IrUeOXFrWHxBEjjbZaQ3IXIQS8wJdAzue2GwYZCjOrgrU1oUHoA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } }, "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", @@ -998,7 +1364,6 @@ "url": "https://www.buymeacoffee.com/ricmoo" } ], - "license": "MIT", "dependencies": { "@ethersproject/address": "^5.7.0", "@ethersproject/bignumber": "^5.7.0", @@ -1013,6 +1378,8 @@ }, "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", @@ -1023,7 +1390,6 @@ "url": "https://www.buymeacoffee.com/ricmoo" } ], - "license": "MIT", "dependencies": { "@ethersproject/bignumber": "^5.7.0", "@ethersproject/bytes": "^5.7.0", @@ -1036,6 +1402,8 @@ }, "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", @@ -1046,7 +1414,6 @@ "url": "https://www.buymeacoffee.com/ricmoo" } ], - "license": "MIT", "dependencies": { "@ethersproject/abstract-provider": "^5.7.0", "@ethersproject/bignumber": "^5.7.0", @@ -1057,6 +1424,8 @@ }, "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", @@ -1067,7 +1436,6 @@ "url": "https://www.buymeacoffee.com/ricmoo" } ], - "license": "MIT", "dependencies": { "@ethersproject/bignumber": "^5.7.0", "@ethersproject/bytes": "^5.7.0", @@ -1078,6 +1446,8 @@ }, "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", @@ -1088,13 +1458,14 @@ "url": "https://www.buymeacoffee.com/ricmoo" } ], - "license": "MIT", "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", @@ -1105,7 +1476,6 @@ "url": "https://www.buymeacoffee.com/ricmoo" } ], - "license": "MIT", "dependencies": { "@ethersproject/bytes": "^5.7.0", "@ethersproject/properties": "^5.7.0" @@ -1113,6 +1483,8 @@ }, "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", @@ -1123,7 +1495,6 @@ "url": "https://www.buymeacoffee.com/ricmoo" } ], - "license": "MIT", "dependencies": { "@ethersproject/bytes": "^5.7.0", "@ethersproject/logger": "^5.7.0", @@ -1132,6 +1503,8 @@ }, "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", @@ -1142,13 +1515,14 @@ "url": "https://www.buymeacoffee.com/ricmoo" } ], - "license": "MIT", "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", @@ -1159,13 +1533,14 @@ "url": "https://www.buymeacoffee.com/ricmoo" } ], - "license": "MIT", "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", @@ -1176,7 +1551,6 @@ "url": "https://www.buymeacoffee.com/ricmoo" } ], - "license": "MIT", "dependencies": { "@ethersproject/abi": "^5.7.0", "@ethersproject/abstract-provider": "^5.7.0", @@ -1192,6 +1566,8 @@ }, "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", @@ -1202,7 +1578,6 @@ "url": "https://www.buymeacoffee.com/ricmoo" } ], - "license": "MIT", "dependencies": { "@ethersproject/abstract-signer": "^5.7.0", "@ethersproject/address": "^5.7.0", @@ -1217,6 +1592,8 @@ }, "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", @@ -1227,7 +1604,6 @@ "url": "https://www.buymeacoffee.com/ricmoo" } ], - "license": "MIT", "dependencies": { "@ethersproject/abstract-signer": "^5.7.0", "@ethersproject/basex": "^5.7.0", @@ -1245,6 +1621,8 @@ }, "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", @@ -1255,7 +1633,6 @@ "url": "https://www.buymeacoffee.com/ricmoo" } ], - "license": "MIT", "dependencies": { "@ethersproject/abstract-signer": "^5.7.0", "@ethersproject/address": "^5.7.0", @@ -1274,6 +1651,8 @@ }, "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", @@ -1284,7 +1663,6 @@ "url": "https://www.buymeacoffee.com/ricmoo" } ], - "license": "MIT", "dependencies": { "@ethersproject/bytes": "^5.7.0", "js-sha3": "0.8.0" @@ -1292,6 +1670,8 @@ }, "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", @@ -1301,11 +1681,12 @@ "type": "individual", "url": "https://www.buymeacoffee.com/ricmoo" } - ], - "license": "MIT" + ] }, "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", @@ -1316,13 +1697,14 @@ "url": "https://www.buymeacoffee.com/ricmoo" } ], - "license": "MIT", "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", @@ -1333,7 +1715,6 @@ "url": "https://www.buymeacoffee.com/ricmoo" } ], - "license": "MIT", "dependencies": { "@ethersproject/bytes": "^5.7.0", "@ethersproject/sha2": "^5.7.0" @@ -1341,6 +1722,8 @@ }, "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", @@ -1351,13 +1734,14 @@ "url": "https://www.buymeacoffee.com/ricmoo" } ], - "license": "MIT", "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", @@ -1368,7 +1752,6 @@ "url": "https://www.buymeacoffee.com/ricmoo" } ], - "license": "MIT", "dependencies": { "@ethersproject/abstract-provider": "^5.7.0", "@ethersproject/abstract-signer": "^5.7.0", @@ -1394,7 +1777,8 @@ }, "node_modules/@ethersproject/providers/node_modules/ws": { "version": "7.4.6", - "license": "MIT", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", + "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", "engines": { "node": ">=8.3.0" }, @@ -1413,6 +1797,8 @@ }, "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", @@ -1423,7 +1809,6 @@ "url": "https://www.buymeacoffee.com/ricmoo" } ], - "license": "MIT", "dependencies": { "@ethersproject/bytes": "^5.7.0", "@ethersproject/logger": "^5.7.0" @@ -1431,6 +1816,8 @@ }, "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", @@ -1441,7 +1828,6 @@ "url": "https://www.buymeacoffee.com/ricmoo" } ], - "license": "MIT", "dependencies": { "@ethersproject/bytes": "^5.7.0", "@ethersproject/logger": "^5.7.0" @@ -1449,6 +1835,8 @@ }, "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", @@ -1459,7 +1847,6 @@ "url": "https://www.buymeacoffee.com/ricmoo" } ], - "license": "MIT", "dependencies": { "@ethersproject/bytes": "^5.7.0", "@ethersproject/logger": "^5.7.0", @@ -1468,6 +1855,8 @@ }, "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", @@ -1478,7 +1867,6 @@ "url": "https://www.buymeacoffee.com/ricmoo" } ], - "license": "MIT", "dependencies": { "@ethersproject/bytes": "^5.7.0", "@ethersproject/logger": "^5.7.0", @@ -1490,6 +1878,8 @@ }, "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", @@ -1500,7 +1890,6 @@ "url": "https://www.buymeacoffee.com/ricmoo" } ], - "license": "MIT", "dependencies": { "@ethersproject/bignumber": "^5.7.0", "@ethersproject/bytes": "^5.7.0", @@ -1512,6 +1901,8 @@ }, "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", @@ -1522,7 +1913,6 @@ "url": "https://www.buymeacoffee.com/ricmoo" } ], - "license": "MIT", "dependencies": { "@ethersproject/bytes": "^5.7.0", "@ethersproject/constants": "^5.7.0", @@ -1531,6 +1921,8 @@ }, "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", @@ -1541,7 +1933,6 @@ "url": "https://www.buymeacoffee.com/ricmoo" } ], - "license": "MIT", "dependencies": { "@ethersproject/address": "^5.7.0", "@ethersproject/bignumber": "^5.7.0", @@ -1556,6 +1947,8 @@ }, "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", @@ -1566,7 +1959,6 @@ "url": "https://www.buymeacoffee.com/ricmoo" } ], - "license": "MIT", "dependencies": { "@ethersproject/bignumber": "^5.7.0", "@ethersproject/constants": "^5.7.0", @@ -1575,6 +1967,8 @@ }, "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", @@ -1585,7 +1979,6 @@ "url": "https://www.buymeacoffee.com/ricmoo" } ], - "license": "MIT", "dependencies": { "@ethersproject/abstract-provider": "^5.7.0", "@ethersproject/abstract-signer": "^5.7.0", @@ -1606,6 +1999,8 @@ }, "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", @@ -1616,7 +2011,6 @@ "url": "https://www.buymeacoffee.com/ricmoo" } ], - "license": "MIT", "dependencies": { "@ethersproject/base64": "^5.7.0", "@ethersproject/bytes": "^5.7.0", @@ -1627,6 +2021,8 @@ }, "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", @@ -1637,7 +2033,6 @@ "url": "https://www.buymeacoffee.com/ricmoo" } ], - "license": "MIT", "dependencies": { "@ethersproject/bytes": "^5.7.0", "@ethersproject/hash": "^5.7.0", @@ -1648,14 +2043,16 @@ }, "node_modules/@graphql-typed-document-node/core": { "version": "3.2.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/@graphql-typed-document-node/core/-/core-3.2.0.tgz", + "integrity": "sha512-mB9oAsNCm9aM3/SOv4YtBMqZbYj10R7dkq8byBqxGY/ncFwhf2oQzMV+LCRlWoDSEBJ3COiR1yeDvMtsoOsuFQ==", "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/@injectivelabs/core-proto-ts": { "version": "0.0.18", - "license": "MIT", + "resolved": "https://registry.npmjs.org/@injectivelabs/core-proto-ts/-/core-proto-ts-0.0.18.tgz", + "integrity": "sha512-WSZS7SQ+I/m8jdc7fhzkMTUhA7i5nVTeKbN6QGqKmOwQ/F+PqM75vDHD9Y9NbLPx9P+m7hyUzSHz4zmajth5jw==", "dependencies": { "@injectivelabs/grpc-web": "^0.0.1", "google-protobuf": "^3.14.0", @@ -1665,12 +2062,14 @@ }, "node_modules/@injectivelabs/core-proto-ts/node_modules/long": { "version": "5.2.3", - "license": "Apache-2.0" + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" }, "node_modules/@injectivelabs/core-proto-ts/node_modules/protobufjs": { "version": "7.2.5", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.5.tgz", + "integrity": "sha512-gGXRSXvxQ7UiPgfw8gevrfRWcTlSbOFg+p/N+JVJEK5VhueL2miT6qTymqAmjr1Q5WbOCyJbyrk6JfWKwlFn6A==", "hasInstallScript": true, - "license": "BSD-3-Clause", "dependencies": { "@protobufjs/aspromise": "^1.1.2", "@protobufjs/base64": "^1.1.2", @@ -1691,7 +2090,8 @@ }, "node_modules/@injectivelabs/dmm-proto-ts": { "version": "1.0.19", - "license": "MIT", + "resolved": "https://registry.npmjs.org/@injectivelabs/dmm-proto-ts/-/dmm-proto-ts-1.0.19.tgz", + "integrity": "sha512-2FCzCziy1RhzmnkAVIU+Asby/GXAVQqKt5/o1s52j0LJXfJMpiCrV6soLfnjTebj61T+1WvJBPFoZCCiVYBpcw==", "dependencies": { "@injectivelabs/grpc-web": "^0.0.1", "google-protobuf": "^3.14.0", @@ -1701,12 +2101,14 @@ }, "node_modules/@injectivelabs/dmm-proto-ts/node_modules/long": { "version": "5.2.3", - "license": "Apache-2.0" + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" }, "node_modules/@injectivelabs/dmm-proto-ts/node_modules/protobufjs": { "version": "7.2.5", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.5.tgz", + "integrity": "sha512-gGXRSXvxQ7UiPgfw8gevrfRWcTlSbOFg+p/N+JVJEK5VhueL2miT6qTymqAmjr1Q5WbOCyJbyrk6JfWKwlFn6A==", "hasInstallScript": true, - "license": "BSD-3-Clause", "dependencies": { "@protobufjs/aspromise": "^1.1.2", "@protobufjs/base64": "^1.1.2", @@ -1727,8 +2129,9 @@ }, "node_modules/@injectivelabs/exceptions": { "version": "1.14.4", + "resolved": "https://registry.npmjs.org/@injectivelabs/exceptions/-/exceptions-1.14.4.tgz", + "integrity": "sha512-mJVzDsw+anL85NzXl0l1Ortk7MEgHdD5EQwFp/XaI1U3cupsHKUfHpAuXjggD+XQVFeWoYOFzk4CJPCBgz6u+w==", "hasInstallScript": true, - "license": "Apache-2.0", "dependencies": { "@injectivelabs/grpc-web": "^0.0.1", "@injectivelabs/ts-types": "^1.14.4", @@ -1739,7 +2142,8 @@ }, "node_modules/@injectivelabs/grpc-web": { "version": "0.0.1", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@injectivelabs/grpc-web/-/grpc-web-0.0.1.tgz", + "integrity": "sha512-Pu5YgaZp+OvR5UWfqbrPdHer3+gDf+b5fQoY+t2VZx1IAVHX8bzbN9EreYTvTYtFeDpYRWM8P7app2u4EX5wTw==", "dependencies": { "browser-headers": "^0.4.1" }, @@ -1749,21 +2153,24 @@ }, "node_modules/@injectivelabs/grpc-web-node-http-transport": { "version": "0.0.2", - "license": "Apache-2.0", + "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==", "peerDependencies": { "@injectivelabs/grpc-web": ">=0.0.1" } }, "node_modules/@injectivelabs/grpc-web-react-native-transport": { "version": "0.0.2", - "license": "Apache-2.0", + "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==", "peerDependencies": { "@injectivelabs/grpc-web": ">=0.0.1" } }, "node_modules/@injectivelabs/indexer-proto-ts": { "version": "1.11.22", - "license": "MIT", + "resolved": "https://registry.npmjs.org/@injectivelabs/indexer-proto-ts/-/indexer-proto-ts-1.11.22.tgz", + "integrity": "sha512-Mx90Q6F2lW03FlqXqw6MKCtKl3Rxuhla2CBlhhXe6XrmZWt+LpkiYinlZCyQDnmwjuqzCqurlMx4/sEjuy5WhA==", "dependencies": { "@injectivelabs/grpc-web": "^0.0.1", "google-protobuf": "^3.14.0", @@ -1773,12 +2180,14 @@ }, "node_modules/@injectivelabs/indexer-proto-ts/node_modules/long": { "version": "5.2.3", - "license": "Apache-2.0" + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" }, "node_modules/@injectivelabs/indexer-proto-ts/node_modules/protobufjs": { "version": "7.2.5", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.5.tgz", + "integrity": "sha512-gGXRSXvxQ7UiPgfw8gevrfRWcTlSbOFg+p/N+JVJEK5VhueL2miT6qTymqAmjr1Q5WbOCyJbyrk6JfWKwlFn6A==", "hasInstallScript": true, - "license": "BSD-3-Clause", "dependencies": { "@protobufjs/aspromise": "^1.1.2", "@protobufjs/base64": "^1.1.2", @@ -1799,7 +2208,8 @@ }, "node_modules/@injectivelabs/mito-proto-ts": { "version": "1.0.52", - "license": "MIT", + "resolved": "https://registry.npmjs.org/@injectivelabs/mito-proto-ts/-/mito-proto-ts-1.0.52.tgz", + "integrity": "sha512-esqrLXy9GheL5DAGTSxhUYOJZXE8g/3NnYVqz/x9MxZHQwYhj3LoV2G8CWB0Ly2i7VEOc0osesgJk08hrgLa+w==", "dependencies": { "@injectivelabs/grpc-web": "^0.0.1", "google-protobuf": "^3.14.0", @@ -1809,12 +2219,14 @@ }, "node_modules/@injectivelabs/mito-proto-ts/node_modules/long": { "version": "5.2.3", - "license": "Apache-2.0" + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" }, "node_modules/@injectivelabs/mito-proto-ts/node_modules/protobufjs": { "version": "7.2.5", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.5.tgz", + "integrity": "sha512-gGXRSXvxQ7UiPgfw8gevrfRWcTlSbOFg+p/N+JVJEK5VhueL2miT6qTymqAmjr1Q5WbOCyJbyrk6JfWKwlFn6A==", "hasInstallScript": true, - "license": "BSD-3-Clause", "dependencies": { "@protobufjs/aspromise": "^1.1.2", "@protobufjs/base64": "^1.1.2", @@ -1835,8 +2247,9 @@ }, "node_modules/@injectivelabs/networks": { "version": "1.14.4", + "resolved": "https://registry.npmjs.org/@injectivelabs/networks/-/networks-1.14.4.tgz", + "integrity": "sha512-2DbbaiI/v5PY+X90zhFMstVcVokpxEytMWZZvRKls6YqSBERhE3lxUF696lk0TEecfZ37CikuxZ7E9hx+eXg2A==", "hasInstallScript": true, - "license": "Apache-2.0", "dependencies": { "@injectivelabs/exceptions": "^1.14.4", "@injectivelabs/ts-types": "^1.14.4", @@ -1847,8 +2260,9 @@ }, "node_modules/@injectivelabs/sdk-ts": { "version": "1.14.4", + "resolved": "https://registry.npmjs.org/@injectivelabs/sdk-ts/-/sdk-ts-1.14.4.tgz", + "integrity": "sha512-Iw4y2YRxZ//p8lumqnSTUpXdoQGpt91wofm8R+eM65KOXX/T0p+6rpPYITWPxjT6E+koH4HXh9InnzzN4UzJQw==", "hasInstallScript": true, - "license": "Apache-2.0", "dependencies": { "@apollo/client": "^3.5.8", "@cosmjs/amino": "^0.30.1", @@ -1892,7 +2306,8 @@ }, "node_modules/@injectivelabs/sdk-ts/node_modules/@cosmjs/amino": { "version": "0.30.1", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@cosmjs/amino/-/amino-0.30.1.tgz", + "integrity": "sha512-yNHnzmvAlkETDYIpeCTdVqgvrdt1qgkOXwuRVi8s27UKI5hfqyE9fJ/fuunXE6ZZPnKkjIecDznmuUOMrMvw4w==", "dependencies": { "@cosmjs/crypto": "^0.30.1", "@cosmjs/encoding": "^0.30.1", @@ -1902,7 +2317,8 @@ }, "node_modules/@injectivelabs/sdk-ts/node_modules/@cosmjs/crypto": { "version": "0.30.1", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@cosmjs/crypto/-/crypto-0.30.1.tgz", + "integrity": "sha512-rAljUlake3MSXs9xAm87mu34GfBLN0h/1uPPV6jEwClWjNkAMotzjC0ab9MARy5FFAvYHL3lWb57bhkbt2GtzQ==", "dependencies": { "@cosmjs/encoding": "^0.30.1", "@cosmjs/math": "^0.30.1", @@ -1915,7 +2331,8 @@ }, "node_modules/@injectivelabs/sdk-ts/node_modules/@cosmjs/encoding": { "version": "0.30.1", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@cosmjs/encoding/-/encoding-0.30.1.tgz", + "integrity": "sha512-rXmrTbgqwihORwJ3xYhIgQFfMSrwLu1s43RIK9I8EBudPx3KmnmyAKzMOVsRDo9edLFNuZ9GIvysUCwQfq3WlQ==", "dependencies": { "base64-js": "^1.3.0", "bech32": "^1.1.4", @@ -1924,11 +2341,13 @@ }, "node_modules/@injectivelabs/sdk-ts/node_modules/@cosmjs/encoding/node_modules/bech32": { "version": "1.1.4", - "license": "MIT" + "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", + "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==" }, "node_modules/@injectivelabs/sdk-ts/node_modules/@cosmjs/json-rpc": { "version": "0.30.1", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@cosmjs/json-rpc/-/json-rpc-0.30.1.tgz", + "integrity": "sha512-pitfC/2YN9t+kXZCbNuyrZ6M8abnCC2n62m+JtU9vQUfaEtVsgy+1Fk4TRQ175+pIWSdBMFi2wT8FWVEE4RhxQ==", "dependencies": { "@cosmjs/stream": "^0.30.1", "xstream": "^11.14.0" @@ -1936,14 +2355,16 @@ }, "node_modules/@injectivelabs/sdk-ts/node_modules/@cosmjs/math": { "version": "0.30.1", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@cosmjs/math/-/math-0.30.1.tgz", + "integrity": "sha512-yaoeI23pin9ZiPHIisa6qqLngfnBR/25tSaWpkTm8Cy10MX70UF5oN4+/t1heLaM6SSmRrhk3psRkV4+7mH51Q==", "dependencies": { "bn.js": "^5.2.0" } }, "node_modules/@injectivelabs/sdk-ts/node_modules/@cosmjs/proto-signing": { "version": "0.30.1", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@cosmjs/proto-signing/-/proto-signing-0.30.1.tgz", + "integrity": "sha512-tXh8pPYXV4aiJVhTKHGyeZekjj+K9s2KKojMB93Gcob2DxUjfKapFYBMJSgfKPuWUPEmyr8Q9km2hplI38ILgQ==", "dependencies": { "@cosmjs/amino": "^0.30.1", "@cosmjs/crypto": "^0.30.1", @@ -1956,7 +2377,8 @@ }, "node_modules/@injectivelabs/sdk-ts/node_modules/@cosmjs/socket": { "version": "0.30.1", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@cosmjs/socket/-/socket-0.30.1.tgz", + "integrity": "sha512-r6MpDL+9N+qOS/D5VaxnPaMJ3flwQ36G+vPvYJsXArj93BjgyFB7BwWwXCQDzZ+23cfChPUfhbINOenr8N2Kow==", "dependencies": { "@cosmjs/stream": "^0.30.1", "isomorphic-ws": "^4.0.1", @@ -1966,7 +2388,8 @@ }, "node_modules/@injectivelabs/sdk-ts/node_modules/@cosmjs/stargate": { "version": "0.30.1", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@cosmjs/stargate/-/stargate-0.30.1.tgz", + "integrity": "sha512-RdbYKZCGOH8gWebO7r6WvNnQMxHrNXInY/gPHPzMjbQF6UatA6fNM2G2tdgS5j5u7FTqlCI10stNXrknaNdzog==", "dependencies": { "@confio/ics23": "^0.6.8", "@cosmjs/amino": "^0.30.1", @@ -1984,14 +2407,16 @@ }, "node_modules/@injectivelabs/sdk-ts/node_modules/@cosmjs/stream": { "version": "0.30.1", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@cosmjs/stream/-/stream-0.30.1.tgz", + "integrity": "sha512-Fg0pWz1zXQdoxQZpdHRMGvUH5RqS6tPv+j9Eh7Q953UjMlrwZVo0YFLC8OTf/HKVf10E4i0u6aM8D69Q6cNkgQ==", "dependencies": { "xstream": "^11.14.0" } }, "node_modules/@injectivelabs/sdk-ts/node_modules/@cosmjs/tendermint-rpc": { "version": "0.30.1", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@cosmjs/tendermint-rpc/-/tendermint-rpc-0.30.1.tgz", + "integrity": "sha512-Z3nCwhXSbPZJ++v85zHObeUggrEHVfm1u18ZRwXxFE9ZMl5mXTybnwYhczuYOl7KRskgwlB+rID0WYACxj4wdQ==", "dependencies": { "@cosmjs/crypto": "^0.30.1", "@cosmjs/encoding": "^0.30.1", @@ -2007,18 +2432,21 @@ }, "node_modules/@injectivelabs/sdk-ts/node_modules/@cosmjs/tendermint-rpc/node_modules/axios": { "version": "0.21.4", - "license": "MIT", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", + "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", "dependencies": { "follow-redirects": "^1.14.0" } }, "node_modules/@injectivelabs/sdk-ts/node_modules/@cosmjs/utils": { "version": "0.30.1", - "license": "Apache-2.0" + "resolved": "https://registry.npmjs.org/@cosmjs/utils/-/utils-0.30.1.tgz", + "integrity": "sha512-KvvX58MGMWh7xA+N+deCfunkA/ZNDvFLw4YbOmX3f/XBIkqrVY7qlotfy2aNb1kgp6h4B6Yc8YawJPDTfvWX7g==" }, "node_modules/@injectivelabs/sdk-ts/node_modules/axios": { "version": "0.27.2", - "license": "MIT", + "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" @@ -2026,11 +2454,13 @@ }, "node_modules/@injectivelabs/sdk-ts/node_modules/bech32": { "version": "2.0.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz", + "integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==" }, "node_modules/@injectivelabs/sdk-ts/node_modules/cosmjs-types": { "version": "0.7.2", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/cosmjs-types/-/cosmjs-types-0.7.2.tgz", + "integrity": "sha512-vf2uLyktjr/XVAgEq0DjMxeAWh1yYREe7AMHDKd7EiHVqxBPCaBS+qEEQUkXbR9ndnckqr1sUG8BQhazh4X5lA==", "dependencies": { "long": "^4.0.0", "protobufjs": "~6.11.2" @@ -2038,7 +2468,8 @@ }, "node_modules/@injectivelabs/sdk-ts/node_modules/ws": { "version": "7.5.9", - "license": "MIT", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", "engines": { "node": ">=8.3.0" }, @@ -2057,8 +2488,9 @@ }, "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, - "license": "Apache-2.0", "dependencies": { "axios": "^0.21.1", "bignumber.js": "^9.0.1", @@ -2070,15 +2502,17 @@ }, "node_modules/@injectivelabs/test-utils/node_modules/axios": { "version": "0.21.4", - "license": "MIT", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", + "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", "dependencies": { "follow-redirects": "^1.14.0" } }, "node_modules/@injectivelabs/token-metadata": { "version": "1.14.4", + "resolved": "https://registry.npmjs.org/@injectivelabs/token-metadata/-/token-metadata-1.14.4.tgz", + "integrity": "sha512-g0jrIFpEdQ4kjUUaMcXWmXWu5owpIGE6GQPj7Gx07kkPTDNDiIfcaHUQ0nzTmcG02h0AhFx1eSpkHZFLSwyG/Q==", "hasInstallScript": true, - "license": "Apache-2.0", "dependencies": { "@injectivelabs/exceptions": "^1.14.4", "@injectivelabs/networks": "^1.14.4", @@ -2095,8 +2529,9 @@ }, "node_modules/@injectivelabs/ts-types": { "version": "1.14.4", + "resolved": "https://registry.npmjs.org/@injectivelabs/ts-types/-/ts-types-1.14.4.tgz", + "integrity": "sha512-c8g81bdrOQoi6S1CbeERRifkwNhjyLWB8lmF7liwRnPjyDciVHfHjikZjVWFLS9tJegNm44N9PWsM4RN9g0rXQ==", "hasInstallScript": true, - "license": "Apache-2.0", "dependencies": { "link-module-alias": "^1.2.0", "shx": "^0.3.2" @@ -2104,8 +2539,9 @@ }, "node_modules/@injectivelabs/utils": { "version": "1.14.4", + "resolved": "https://registry.npmjs.org/@injectivelabs/utils/-/utils-1.14.4.tgz", + "integrity": "sha512-eyx6XpgqdmEhEhdwNT4zEDYx+wXOhW01foCGC6e0Dmmrcxv5Bjd+R2BuLopKJ9h22OYNJm6dAX3ZtcoFwpFYbQ==", "hasInstallScript": true, - "license": "Apache-2.0", "dependencies": { "@injectivelabs/exceptions": "^1.14.4", "@injectivelabs/ts-types": "^1.14.4", @@ -2120,7 +2556,8 @@ }, "node_modules/@injectivelabs/utils/node_modules/axios": { "version": "0.21.4", - "license": "MIT", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", + "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", "dependencies": { "follow-redirects": "^1.14.0" } @@ -2533,7 +2970,8 @@ }, "node_modules/@metamask/eth-sig-util": { "version": "4.0.1", - "license": "ISC", + "resolved": "https://registry.npmjs.org/@metamask/eth-sig-util/-/eth-sig-util-4.0.1.tgz", + "integrity": "sha512-tghyZKLHZjcdlDqCA3gNZmLeR0XvOE9U1qoQO9ohyAZT6Pya+H9vkBPcsyXytmYLNgVoin7CKCmweo/R43V+tQ==", "dependencies": { "ethereumjs-abi": "^0.6.8", "ethereumjs-util": "^6.2.1", @@ -2547,18 +2985,21 @@ }, "node_modules/@metamask/eth-sig-util/node_modules/@types/bn.js": { "version": "4.11.6", - "license": "MIT", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", "dependencies": { "@types/node": "*" } }, "node_modules/@metamask/eth-sig-util/node_modules/bn.js": { "version": "4.12.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" }, "node_modules/@metamask/eth-sig-util/node_modules/ethereumjs-util": { "version": "6.2.1", - "license": "MPL-2.0", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", + "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", "dependencies": { "@types/bn.js": "^4.11.3", "bn.js": "^4.11.0", @@ -2681,23 +3122,28 @@ }, "node_modules/@protobufjs/aspromise": { "version": "1.1.2", - "license": "BSD-3-Clause" + "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", - "license": "BSD-3-Clause" + "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", - "license": "BSD-3-Clause" + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" }, "node_modules/@protobufjs/eventemitter": { "version": "1.1.0", - "license": "BSD-3-Clause" + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==" }, "node_modules/@protobufjs/fetch": { "version": "1.1.0", - "license": "BSD-3-Clause", + "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" @@ -2705,23 +3151,28 @@ }, "node_modules/@protobufjs/float": { "version": "1.0.2", - "license": "BSD-3-Clause" + "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", - "license": "BSD-3-Clause" + "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", - "license": "BSD-3-Clause" + "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", - "license": "BSD-3-Clause" + "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", - "license": "BSD-3-Clause" + "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.3", @@ -2905,8 +3356,9 @@ } }, "node_modules/@types/bn.js": { - "version": "5.1.1", - "license": "MIT", + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.5.tgz", + "integrity": "sha512-V46N0zwKRF5Q00AZ6hWtN0T8gGmDUaUzLWQvHFo5yThtVwK/VCenFY3wXVbOvNfajEpsTfQM4IN9k/d6gUVX3A==", "dependencies": { "@types/node": "*" } @@ -2992,14 +3444,16 @@ }, "node_modules/@types/lodash.values": { "version": "4.3.9", - "license": "MIT", + "resolved": "https://registry.npmjs.org/@types/lodash.values/-/lodash.values-4.3.9.tgz", + "integrity": "sha512-IJ20OEfqNwm3k8ENwoM3q0yOs4UMpgtD4GqxB4lwBHToGthHWqhyh5DdSgQjioocz0QK2SSBkJfCq95ZTV8BTw==", "dependencies": { "@types/lodash": "*" } }, "node_modules/@types/long": { "version": "4.0.2", - "license": "MIT" + "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", + "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==" }, "node_modules/@types/minimist": { "version": "1.2.4", @@ -3022,7 +3476,8 @@ }, "node_modules/@types/pbkdf2": { "version": "3.1.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/@types/pbkdf2/-/pbkdf2-3.1.2.tgz", + "integrity": "sha512-uRwJqmiXmh9++aSu1VNEn3iIxWOhd8AHXNSdlaLfdAAdSTY9jYVeGWnzejM3dvrkbqE3/hyQkQQ29IFATEGlew==", "dependencies": { "@types/node": "*" } @@ -3033,7 +3488,8 @@ }, "node_modules/@types/secp256k1": { "version": "4.0.6", - "license": "MIT", + "resolved": "https://registry.npmjs.org/@types/secp256k1/-/secp256k1-4.0.6.tgz", + "integrity": "sha512-hHxJU6PAEUn0TP4S/ZOzuTUvJWuZ6eIKeNKb5RBpODvSl6hp1Wrw4s7ATY50rklRCScUDpHzVA/DQdSjJ3UoYQ==", "dependencies": { "@types/node": "*" } @@ -3067,6 +3523,18 @@ "resolved": "connect", "link": true }, + "node_modules/@wormhole-foundation/connect-sdk-algorand": { + "resolved": "platforms/algorand", + "link": true + }, + "node_modules/@wormhole-foundation/connect-sdk-algorand-core": { + "resolved": "platforms/algorand/protocols/core", + "link": true + }, + "node_modules/@wormhole-foundation/connect-sdk-algorand-tokenbridge": { + "resolved": "platforms/algorand/protocols/tokenBridge", + "link": true + }, "node_modules/@wormhole-foundation/connect-sdk-cosmwasm": { "resolved": "platforms/cosmwasm", "link": true @@ -3108,8 +3576,22 @@ "link": true }, "node_modules/@wormhole-foundation/connect-sdk-solana-cctp": { - "resolved": "platforms/solana/protocols/cctp", - "link": true + "version": "0.3.0-beta.6", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/connect-sdk-solana-cctp/-/connect-sdk-solana-cctp-0.3.0-beta.6.tgz", + "integrity": "sha512-FGZBTNxTpXLyXvB3dn0CT3yO+1kffpQ2RGwjP3KXfuYBA9lcGG/RQ1do0szzU3P1oGrKJ20ULcpUIbEbVM0kvQ==", + "dependencies": { + "@coral-xyz/borsh": "0.2.6", + "@project-serum/anchor": "0.25.0", + "@project-serum/borsh": "0.2.5", + "@solana/spl-token": "0.3.5", + "@solana/web3.js": "1.66.2", + "@wormhole-foundation/connect-sdk": "^0.3.0-beta.6", + "@wormhole-foundation/connect-sdk-solana": "^0.3.0-beta.6", + "@wormhole-foundation/connect-sdk-solana-core": "^0.3.0-beta.6" + }, + "engines": { + "node": ">=16" + } }, "node_modules/@wormhole-foundation/connect-sdk-solana-core": { "resolved": "platforms/solana/protocols/core", @@ -3127,9 +3609,21 @@ "resolved": "core/definitions", "link": true }, + "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==", + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/@wry/context": { "version": "0.7.4", - "license": "MIT", + "resolved": "https://registry.npmjs.org/@wry/context/-/context-0.7.4.tgz", + "integrity": "sha512-jmT7Sb4ZQWI5iyu3lobQxICu2nC/vbUhP0vIdd6tHC9PTfenmRmuIFqktc6GH9cgi+ZHnsLWPvfSvc4DrYmKiQ==", "dependencies": { "tslib": "^2.3.0" }, @@ -3139,7 +3633,8 @@ }, "node_modules/@wry/equality": { "version": "0.5.7", - "license": "MIT", + "resolved": "https://registry.npmjs.org/@wry/equality/-/equality-0.5.7.tgz", + "integrity": "sha512-BRFORjsTuQv5gxcXsuDXx6oGRhuVsEGwZy6LOzRRfgu+eSfxbhUQ9L9YtSEIuIjY/o7g3iWFjrc5eSY1GXP2Dw==", "dependencies": { "tslib": "^2.3.0" }, @@ -3148,8 +3643,9 @@ } }, "node_modules/@wry/trie": { - "version": "0.4.3", - "license": "MIT", + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@wry/trie/-/trie-0.5.0.tgz", + "integrity": "sha512-FNoYzHawTMk/6KMQoEG5O4PuioX19UbwdQKF44yw0nLfOypfQdjtfZzo/UIJWAJ23sNIFbD1Ug9lbaDGMwbqQA==", "dependencies": { "tslib": "^2.3.0" }, @@ -3178,7 +3674,35 @@ }, "node_modules/aes-js": { "version": "3.0.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", + "integrity": "sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==" + }, + "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", @@ -3444,7 +3968,8 @@ }, "node_modules/bech32": { "version": "1.1.4", - "license": "MIT" + "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", + "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==" }, "node_modules/bigint-buffer": { "version": "1.1.5", @@ -3481,14 +4006,16 @@ }, "node_modules/bip39": { "version": "3.1.0", - "license": "ISC", + "resolved": "https://registry.npmjs.org/bip39/-/bip39-3.1.0.tgz", + "integrity": "sha512-c9kiwdk45Do5GL0vJMe7tS95VjCii65mYAH7DfWl3uW8AVzXKQVUm64i3hzVybBDMp9r7j9iNxR85+ul8MdN/A==", "dependencies": { "@noble/hashes": "^1.2.0" } }, "node_modules/blakejs": { "version": "1.2.1", - "license": "MIT" + "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", @@ -3524,11 +4051,13 @@ }, "node_modules/brorand": { "version": "1.1.0", - "license": "MIT" + "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", - "license": "Apache-2.0" + "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", @@ -3537,7 +4066,8 @@ }, "node_modules/browserify-aes": { "version": "1.2.0", - "license": "MIT", + "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", @@ -3598,7 +4128,8 @@ }, "node_modules/bs58check": { "version": "2.1.2", - "license": "MIT", + "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", @@ -3649,7 +4180,8 @@ }, "node_modules/buffer-xor": { "version": "1.0.3", - "license": "MIT" + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==" }, "node_modules/bufferutil": { "version": "4.0.7", @@ -3813,7 +4345,8 @@ }, "node_modules/cipher-base": { "version": "1.0.4", - "license": "MIT", + "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" @@ -3837,48 +4370,6 @@ "node": ">=12" } }, - "node_modules/cliui/node_modules/emoji-regex": { - "version": "8.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/cliui/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/cliui/node_modules/string-width": { - "version": "4.2.3", - "dev": 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/cliui/node_modules/wrap-ansi": { - "version": "7.0.0", - "dev": 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/co": { "version": "4.6.0", "dev": true, @@ -4029,7 +4520,8 @@ }, "node_modules/copyfiles": { "version": "2.4.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/copyfiles/-/copyfiles-2.4.1.tgz", + "integrity": "sha512-fereAvAvxDrQDOXybk3Qu3dPbOoKoysFMWtkY3mv5BsL8//OSZVL5DCLYqgRfY5cWirgRzlC+WSrxp6Bo3eNZg==", "dependencies": { "glob": "^7.0.5", "minimatch": "^3.0.3", @@ -4046,54 +4538,18 @@ }, "node_modules/copyfiles/node_modules/cliui": { "version": "7.0.4", - "license": "ISC", + "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/emoji-regex": { - "version": "8.0.0", - "license": "MIT" - }, - "node_modules/copyfiles/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/copyfiles/node_modules/string-width": { - "version": "4.2.3", - "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/copyfiles/node_modules/wrap-ansi": { - "version": "7.0.0", - "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/copyfiles/node_modules/yargs": { "version": "16.2.0", - "license": "MIT", + "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", @@ -4109,15 +4565,18 @@ }, "node_modules/core-util-is": { "version": "1.0.3", - "license": "MIT" + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" }, "node_modules/cosmjs-types": { "version": "0.9.0", - "license": "Apache-2.0" + "resolved": "https://registry.npmjs.org/cosmjs-types/-/cosmjs-types-0.9.0.tgz", + "integrity": "sha512-MN/yUe6mkJwHnCFfsNPeCfXVhyxHYW6c/xDUzrSbBycYzw++XvWDMJArXp2pLdgD6FQ8DW79vkPjeNKVrXaHeQ==" }, "node_modules/create-hash": { "version": "1.2.0", - "license": "MIT", + "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", @@ -4128,7 +4587,8 @@ }, "node_modules/create-hmac": { "version": "1.1.7", - "license": "MIT", + "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", @@ -4270,8 +4730,9 @@ } }, "node_modules/define-data-property": { - "version": "1.1.0", - "license": "MIT", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz", + "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==", "dependencies": { "get-intrinsic": "^1.2.1", "gopd": "^1.0.1", @@ -4283,7 +4744,8 @@ }, "node_modules/define-properties": { "version": "1.2.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", "dependencies": { "define-data-property": "^1.0.1", "has-property-descriptors": "^1.0.0", @@ -4375,7 +4837,8 @@ }, "node_modules/elliptic": { "version": "6.5.4", - "license": "MIT", + "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", @@ -4388,7 +4851,8 @@ }, "node_modules/elliptic/node_modules/bn.js": { "version": "4.12.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" }, "node_modules/emittery": { "version": "0.13.1", @@ -4401,6 +4865,11 @@ "url": "https://github.com/sindresorhus/emittery?sponsor=1" } }, + "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==" + }, "node_modules/error-ex": { "version": "1.3.2", "dev": true, @@ -4420,6 +4889,44 @@ "es6-promise": "^4.0.3" } }, + "node_modules/esbuild": { + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.10.tgz", + "integrity": "sha512-S1Y27QGt/snkNYrRcswgRFqZjaTG5a5xM3EQo97uNBnH505pdzSNe/HLBq1v0RO7iK/ngdbhJB6mDAp0OK+iUA==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.19.10", + "@esbuild/android-arm": "0.19.10", + "@esbuild/android-arm64": "0.19.10", + "@esbuild/android-x64": "0.19.10", + "@esbuild/darwin-arm64": "0.19.10", + "@esbuild/darwin-x64": "0.19.10", + "@esbuild/freebsd-arm64": "0.19.10", + "@esbuild/freebsd-x64": "0.19.10", + "@esbuild/linux-arm": "0.19.10", + "@esbuild/linux-arm64": "0.19.10", + "@esbuild/linux-ia32": "0.19.10", + "@esbuild/linux-loong64": "0.19.10", + "@esbuild/linux-mips64el": "0.19.10", + "@esbuild/linux-ppc64": "0.19.10", + "@esbuild/linux-riscv64": "0.19.10", + "@esbuild/linux-s390x": "0.19.10", + "@esbuild/linux-x64": "0.19.10", + "@esbuild/netbsd-x64": "0.19.10", + "@esbuild/openbsd-x64": "0.19.10", + "@esbuild/sunos-x64": "0.19.10", + "@esbuild/win32-arm64": "0.19.10", + "@esbuild/win32-ia32": "0.19.10", + "@esbuild/win32-x64": "0.19.10" + } + }, "node_modules/escalade": { "version": "3.1.1", "license": "MIT", @@ -4459,32 +4966,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/eslint-formatter-pretty/node_modules/emoji-regex": { - "version": "8.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/eslint-formatter-pretty/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/eslint-formatter-pretty/node_modules/string-width": { - "version": "4.2.3", - "dev": 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/eslint-rule-docs": { "version": "1.1.235", "dev": true, @@ -4504,7 +4985,8 @@ }, "node_modules/ethereum-cryptography": { "version": "0.1.3", - "license": "MIT", + "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", @@ -4525,7 +5007,8 @@ }, "node_modules/ethereumjs-abi": { "version": "0.6.8", - "license": "MIT", + "resolved": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz", + "integrity": "sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA==", "dependencies": { "bn.js": "^4.11.8", "ethereumjs-util": "^6.0.0" @@ -4533,18 +5016,21 @@ }, "node_modules/ethereumjs-abi/node_modules/@types/bn.js": { "version": "4.11.6", - "license": "MIT", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", "dependencies": { "@types/node": "*" } }, "node_modules/ethereumjs-abi/node_modules/bn.js": { "version": "4.12.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" }, "node_modules/ethereumjs-abi/node_modules/ethereumjs-util": { "version": "6.2.1", - "license": "MPL-2.0", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", + "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", "dependencies": { "@types/bn.js": "^4.11.3", "bn.js": "^4.11.0", @@ -4557,7 +5043,8 @@ }, "node_modules/ethereumjs-util": { "version": "7.1.5", - "license": "MPL-2.0", + "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", @@ -4571,6 +5058,8 @@ }, "node_modules/ethers": { "version": "5.7.2", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.7.2.tgz", + "integrity": "sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==", "funding": [ { "type": "individual", @@ -4581,7 +5070,6 @@ "url": "https://www.buymeacoffee.com/ricmoo" } ], - "license": "MIT", "dependencies": { "@ethersproject/abi": "5.7.0", "@ethersproject/abstract-provider": "5.7.0", @@ -4617,7 +5105,8 @@ }, "node_modules/ethjs-util": { "version": "0.1.6", - "license": "MIT", + "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz", + "integrity": "sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==", "dependencies": { "is-hex-prefixed": "1.0.0", "strip-hex-prefix": "1.0.0" @@ -4633,7 +5122,8 @@ }, "node_modules/evp_bytestokey": { "version": "1.0.3", - "license": "MIT", + "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" @@ -4834,9 +5324,27 @@ "version": "1.0.0", "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, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, "node_modules/function-bind": { - "version": "1.1.1", - "license": "MIT" + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/gensync": { "version": "1.0.0-beta.2", @@ -4862,13 +5370,14 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.1", - "license": "MIT", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz", + "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==", "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", + "function-bind": "^1.1.2", "has-proto": "^1.0.1", - "has-symbols": "^1.0.3" + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -4885,12 +5394,24 @@ "node_modules/get-stream": { "version": "6.0.1", "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "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/sponsors/sindresorhus" + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" } }, "node_modules/glob": { @@ -4913,7 +5434,8 @@ }, "node_modules/globalthis": { "version": "1.0.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", + "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", "dependencies": { "define-properties": "^1.1.3" }, @@ -4945,11 +5467,13 @@ }, "node_modules/google-protobuf": { "version": "3.21.2", - "license": "(BSD-3-Clause AND Apache-2.0)" + "resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-3.21.2.tgz", + "integrity": "sha512-3MSOYFO5U9mPGikIYCzK0SaThypfGgS6bHqrUGXG3DPHCrb+txNqeEcns1W0lkGfk0rCyNXm7xB9rMxnCiZOoA==" }, "node_modules/gopd": { "version": "1.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", "dependencies": { "get-intrinsic": "^1.1.3" }, @@ -4963,14 +5487,16 @@ }, "node_modules/graphql": { "version": "16.8.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.8.1.tgz", + "integrity": "sha512-59LZHPdGZVh695Ud9lRzPBVTtlX9ZCV150Er2W43ro37wVof0ctenSaskPPjN7lVTIN8mSZt8PHUNKZuNQUuxw==", "engines": { "node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0" } }, "node_modules/graphql-tag": { "version": "2.12.6", - "license": "MIT", + "resolved": "https://registry.npmjs.org/graphql-tag/-/graphql-tag-2.12.6.tgz", + "integrity": "sha512-FdSNcu2QQcWnM2VNvSCCDCVS5PpPqpzgFT8+GXzqJuoDd0CBncxCY278u4mhRO7tMgo2JjgJA5aZ+nWSQ/Z+xg==", "dependencies": { "tslib": "^2.1.0" }, @@ -5007,10 +5533,11 @@ } }, "node_modules/has-property-descriptors": { - "version": "1.0.0", - "license": "MIT", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz", + "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==", "dependencies": { - "get-intrinsic": "^1.1.1" + "get-intrinsic": "^1.2.2" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -5018,7 +5545,8 @@ }, "node_modules/has-proto": { "version": "1.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", "engines": { "node": ">= 0.4" }, @@ -5028,7 +5556,8 @@ }, "node_modules/has-symbols": { "version": "1.0.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", "engines": { "node": ">= 0.4" }, @@ -5038,7 +5567,8 @@ }, "node_modules/hash-base": { "version": "3.1.0", - "license": "MIT", + "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", @@ -5050,12 +5580,24 @@ }, "node_modules/hash.js": { "version": "1.1.7", - "license": "MIT", + "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==", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/he": { "version": "1.2.0", "dev": true, @@ -5064,9 +5606,15 @@ "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", - "license": "MIT", + "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", @@ -5075,14 +5623,16 @@ }, "node_modules/hoist-non-react-statics": { "version": "3.3.2", - "license": "BSD-3-Clause", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", + "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", "dependencies": { "react-is": "^16.7.0" } }, "node_modules/hoist-non-react-statics/node_modules/react-is": { "version": "16.13.1", - "license": "MIT" + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, "node_modules/hosted-git-info": { "version": "4.1.0", @@ -5118,7 +5668,8 @@ }, "node_modules/http-status-codes": { "version": "2.3.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/http-status-codes/-/http-status-codes-2.3.0.tgz", + "integrity": "sha512-RJ8XvFvpPM/Dmc5SV+dC4y5PCeOhT3x1Hq0NU3rjGeg5a/CqlhZ7uudknPwZFz4aeAXDcbAyaeP7GAo9lvngtA==" }, "node_modules/human-signals": { "version": "2.1.0", @@ -5202,7 +5753,8 @@ }, "node_modules/interpret": { "version": "1.4.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", "engines": { "node": ">= 0.10" } @@ -5249,6 +5801,14 @@ "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==", + "engines": { + "node": ">=8" + } + }, "node_modules/is-generator-fn": { "version": "2.1.0", "dev": true, @@ -5270,7 +5830,8 @@ }, "node_modules/is-hex-prefixed": { "version": "1.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", + "integrity": "sha512-WvtOiug1VFrE9v1Cydwm+FnXd3+w9GaeVUss5W4v/SLy3UW00vP+6iNF2SdnfiBoLy4bTqVdkftNGTUeOFVsbA==", "engines": { "node": ">=6.5.0", "npm": ">=3" @@ -5316,7 +5877,8 @@ }, "node_modules/isarray": { "version": "0.0.1", - "license": "MIT" + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==" }, "node_modules/isexe": { "version": "2.0.0", @@ -5975,6 +6537,11 @@ "version": "0.8.0", "license": "MIT" }, + "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", "license": "MIT" @@ -5992,7 +6559,8 @@ }, "node_modules/jscrypto": { "version": "1.0.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/jscrypto/-/jscrypto-1.0.3.tgz", + "integrity": "sha512-lryZl0flhodv4SZHOqyb1bx5sKcJxj0VBo0Kzb4QMAg3L021IC9uGpl0RCZa+9KJwlRGSK2C80ITcwbe19OKLQ==", "bin": { "jscrypto": "bin/cli.js" } @@ -6008,6 +6576,14 @@ "node": ">=4" } }, + "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-parse-even-better-errors": { "version": "2.3.1", "dev": true, @@ -6049,7 +6625,8 @@ }, "node_modules/jsonschema": { "version": "1.4.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.4.1.tgz", + "integrity": "sha512-S6cATIPVv1z0IlxdN+zUk5EPjkGCdnhN4wVSBlvoUO1tOLJootbo9CquNJmbIh4yikWHiUedhRYrNPn1arpEmQ==", "engines": { "node": "*" } @@ -6070,8 +6647,9 @@ }, "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, - "license": "MIT", "dependencies": { "node-addon-api": "^2.0.0", "node-gyp-build": "^4.2.0", @@ -6083,7 +6661,8 @@ }, "node_modules/keccak256": { "version": "1.0.6", - "license": "MIT", + "resolved": "https://registry.npmjs.org/keccak256/-/keccak256-1.0.6.tgz", + "integrity": "sha512-8GLiM01PkdJVGUhR1e6M/AvWnSqYS0HaERI+K/QtStGDGlSTx2B1zTqZk4Zlqu5TxHJNTxWAdP9Y+WI50OApUw==", "dependencies": { "bn.js": "^5.2.0", "buffer": "^6.0.3", @@ -6116,22 +6695,26 @@ }, "node_modules/libsodium": { "version": "0.7.13", - "license": "ISC" + "resolved": "https://registry.npmjs.org/libsodium/-/libsodium-0.7.13.tgz", + "integrity": "sha512-mK8ju0fnrKXXfleL53vtp9xiPq5hKM0zbDQtcxQIsSmxNgSxqCj6R7Hl9PkrNe2j29T4yoDaF7DJLK9/i5iWUw==" }, "node_modules/libsodium-sumo": { "version": "0.7.13", - "license": "ISC" + "resolved": "https://registry.npmjs.org/libsodium-sumo/-/libsodium-sumo-0.7.13.tgz", + "integrity": "sha512-zTGdLu4b9zSNLfovImpBCbdAA4xkpkZbMnSQjP8HShyOutnGjRHmSOKlsylh1okao6QhLiz7nG98EGn+04cZjQ==" }, "node_modules/libsodium-wrappers": { "version": "0.7.13", - "license": "ISC", + "resolved": "https://registry.npmjs.org/libsodium-wrappers/-/libsodium-wrappers-0.7.13.tgz", + "integrity": "sha512-kasvDsEi/r1fMzKouIDv7B8I6vNmknXwGiYodErGuESoFTohGSKZplFtVxZqHaoQ217AynyIFgnOVRitpHs0Qw==", "dependencies": { "libsodium": "^0.7.13" } }, "node_modules/libsodium-wrappers-sumo": { "version": "0.7.13", - "license": "ISC", + "resolved": "https://registry.npmjs.org/libsodium-wrappers-sumo/-/libsodium-wrappers-sumo-0.7.13.tgz", + "integrity": "sha512-lz4YdplzDRh6AhnLGF2Dj2IUj94xRN6Bh8T0HLNwzYGwPehQJX6c7iYVrFUPZ3QqxE0bqC+K0IIqqZJYWumwSQ==", "dependencies": { "libsodium-sumo": "^0.7.13" } @@ -6143,7 +6726,8 @@ }, "node_modules/link-module-alias": { "version": "1.2.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/link-module-alias/-/link-module-alias-1.2.0.tgz", + "integrity": "sha512-ahPjXepbSVKbahTB6LxR//VHm8HPfI+QQygCH+E82spBY4HR5VPJTvlhKBc9F7muVxnS6C1rRfoPOXAbWO/fyw==", "dependencies": { "chalk": "^2.4.1" }, @@ -6156,7 +6740,8 @@ }, "node_modules/link-module-alias/node_modules/ansi-styles": { "version": "3.2.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dependencies": { "color-convert": "^1.9.0" }, @@ -6166,7 +6751,8 @@ }, "node_modules/link-module-alias/node_modules/chalk": { "version": "2.4.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -6178,32 +6764,37 @@ }, "node_modules/link-module-alias/node_modules/color-convert": { "version": "1.9.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dependencies": { "color-name": "1.1.3" } }, "node_modules/link-module-alias/node_modules/color-name": { "version": "1.1.3", - "license": "MIT" + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" }, "node_modules/link-module-alias/node_modules/escape-string-regexp": { "version": "1.0.5", - "license": "MIT", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "engines": { "node": ">=0.8.0" } }, "node_modules/link-module-alias/node_modules/has-flag": { "version": "3.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "engines": { "node": ">=4" } }, "node_modules/link-module-alias/node_modules/supports-color": { "version": "5.5.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dependencies": { "has-flag": "^3.0.0" }, @@ -6240,7 +6831,8 @@ }, "node_modules/lodash.values": { "version": "4.3.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/lodash.values/-/lodash.values-4.3.0.tgz", + "integrity": "sha512-r0RwvdCv8id9TUblb/O7rYPwVy6lerCbcawrfdo9iC/1t1wsNMJknO79WNBgwkH0hIeJ08jmvvESbFpNb4jH0Q==" }, "node_modules/log-symbols": { "version": "4.1.0", @@ -6259,11 +6851,13 @@ }, "node_modules/long": { "version": "4.0.0", - "license": "Apache-2.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", - "license": "MIT", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", "dependencies": { "js-tokens": "^3.0.0 || ^4.0.0" }, @@ -6349,7 +6943,8 @@ }, "node_modules/md5.js": { "version": "1.3.5", - "license": "MIT", + "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", @@ -6460,11 +7055,13 @@ }, "node_modules/minimalistic-assert": { "version": "1.0.1", - "license": "ISC" + "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", - "license": "MIT" + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==" }, "node_modules/minimatch": { "version": "3.1.2", @@ -6563,11 +7160,6 @@ "wrap-ansi": "^7.0.0" } }, - "node_modules/mocha/node_modules/emoji-regex": { - "version": "8.0.0", - "dev": true, - "license": "MIT" - }, "node_modules/mocha/node_modules/glob": { "version": "7.2.0", "dev": true, @@ -6598,14 +7190,6 @@ "node": "*" } }, - "node_modules/mocha/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/mocha/node_modules/minimatch": { "version": "5.0.1", "dev": true, @@ -6630,19 +7214,6 @@ "dev": true, "license": "MIT" }, - "node_modules/mocha/node_modules/string-width": { - "version": "4.2.3", - "dev": 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/mocha/node_modules/supports-color": { "version": "8.1.1", "dev": true, @@ -6657,22 +7228,6 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/mocha/node_modules/wrap-ansi": { - "version": "7.0.0", - "dev": 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/mocha/node_modules/yargs": { "version": "16.2.0", "dev": true, @@ -6733,7 +7288,8 @@ }, "node_modules/node-addon-api": { "version": "2.0.2", - "license": "MIT" + "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", @@ -6774,7 +7330,8 @@ }, "node_modules/noms": { "version": "0.0.0", - "license": "ISC", + "resolved": "https://registry.npmjs.org/noms/-/noms-0.0.0.tgz", + "integrity": "sha512-lNDU9VJaOPxUmXcLb+HQFeUgQQPtMI24Gt6hgfuMHRJgMRHMF/qZ4HJD3GDru4sSw9IQl2jPjAYnQrdIeLbwow==", "dependencies": { "inherits": "^2.0.1", "readable-stream": "~1.0.31" @@ -6782,7 +7339,8 @@ }, "node_modules/noms/node_modules/readable-stream": { "version": "1.0.34", - "license": "MIT", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg==", "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.1", @@ -6792,7 +7350,8 @@ }, "node_modules/noms/node_modules/string_decoder": { "version": "0.10.31", - "license": "MIT" + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==" }, "node_modules/normalize-package-data": { "version": "3.0.3", @@ -6829,14 +7388,16 @@ }, "node_modules/object-assign": { "version": "4.1.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", "engines": { "node": ">=0.10.0" } }, "node_modules/object-keys": { "version": "1.1.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", "engines": { "node": ">= 0.4" } @@ -6863,14 +7424,27 @@ } }, "node_modules/optimism": { - "version": "0.17.5", - "license": "MIT", + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/optimism/-/optimism-0.18.0.tgz", + "integrity": "sha512-tGn8+REwLRNFnb9WmcY5IfpOqeX2kpaYJ1s6Ae3mn12AeydLkR3j+jSCmVQFoXqU8D41PAJ1RG1rCRNWmNZVmQ==", "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==", + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/p-limit": { "version": "3.1.0", "dev": true, @@ -6973,7 +7547,8 @@ }, "node_modules/pbkdf2": { "version": "3.1.2", - "license": "MIT", + "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", @@ -7122,7 +7697,8 @@ }, "node_modules/process-nextick-args": { "version": "2.0.1", - "license": "MIT" + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" }, "node_modules/prompts": { "version": "2.4.2", @@ -7138,7 +7714,8 @@ }, "node_modules/prop-types": { "version": "15.8.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", + "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", "dependencies": { "loose-envify": "^1.4.0", "object-assign": "^4.1.1", @@ -7147,7 +7724,8 @@ }, "node_modules/prop-types/node_modules/react-is": { "version": "16.13.1", - "license": "MIT" + "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", @@ -7159,8 +7737,9 @@ }, "node_modules/protobufjs": { "version": "6.11.4", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.4.tgz", + "integrity": "sha512-5kQWPaJHi1WoCpjTGszzQ32PG2F4+wRY6BmAT4Vfw56Q2FZ4YZzK20xUYQH4YkfehY1e6QSICrJquM6xXZNcrw==", "hasInstallScript": true, - "license": "BSD-3-Clause", "dependencies": { "@protobufjs/aspromise": "^1.1.2", "@protobufjs/base64": "^1.1.2", @@ -7359,7 +7938,8 @@ }, "node_modules/readable-stream": { "version": "3.6.2", - "license": "MIT", + "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", @@ -7382,10 +7962,13 @@ }, "node_modules/readonly-date": { "version": "1.0.0", - "license": "Apache-2.0" + "resolved": "https://registry.npmjs.org/readonly-date/-/readonly-date-1.0.0.tgz", + "integrity": "sha512-tMKIV7hlk0h4mO3JTmmVuIlJVXjKk3Sep9Bf5OH0O+758ruuVkUy2J9SttDLm91IEX/WHlXPSpxMGjPj4beMIQ==" }, "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==", "dependencies": { "resolve": "^1.1.6" }, @@ -7457,6 +8040,15 @@ "node": ">=8" } }, + "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/resolve.exports": { "version": "2.0.2", "dev": true, @@ -7467,7 +8059,8 @@ }, "node_modules/response-iterator": { "version": "0.2.6", - "license": "MIT", + "resolved": "https://registry.npmjs.org/response-iterator/-/response-iterator-0.2.6.tgz", + "integrity": "sha512-pVzEEzrsg23Sh053rmDUvLSkGXluZio0qu8VT6ukrYuvtjVfCbDZH9d6PGXb8HZfzdNZt8feXv/jvUzlhRgLnw==", "engines": { "node": ">=0.8" } @@ -7483,7 +8076,8 @@ }, "node_modules/ripemd160": { "version": "2.0.2", - "license": "MIT", + "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" @@ -7491,7 +8085,8 @@ }, "node_modules/rlp": { "version": "2.2.7", - "license": "MPL-2.0", + "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.7.tgz", + "integrity": "sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ==", "dependencies": { "bn.js": "^5.2.0" }, @@ -7541,7 +8136,8 @@ }, "node_modules/rxjs": { "version": "7.8.1", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", "dependencies": { "tslib": "^2.1.0" } @@ -7566,12 +8162,14 @@ }, "node_modules/scrypt-js": { "version": "3.0.1", - "license": "MIT" + "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, - "license": "MIT", "dependencies": { "elliptic": "^6.5.4", "node-addon-api": "^2.0.0", @@ -7621,11 +8219,13 @@ }, "node_modules/setimmediate": { "version": "1.0.5", - "license": "MIT" + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==" }, "node_modules/sha.js": { "version": "2.4.11", - "license": "(MIT AND BSD-3-Clause)", + "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" @@ -7655,7 +8255,8 @@ }, "node_modules/shelljs": { "version": "0.8.5", - "license": "BSD-3-Clause", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", + "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", "dependencies": { "glob": "^7.0.0", "interpret": "^1.0.0", @@ -7681,7 +8282,8 @@ }, "node_modules/shx": { "version": "0.3.4", - "license": "MIT", + "resolved": "https://registry.npmjs.org/shx/-/shx-0.3.4.tgz", + "integrity": "sha512-N6A9MLVqjxZYcVn8hLmtneQWIJtp8IKzMP4eMnx+nqkvXoqinUPCbUFLp2UcWTEIUONhlk0ewxr/jaVGlc+J+g==", "dependencies": { "minimist": "^1.2.3", "shelljs": "^0.8.5" @@ -7721,7 +8323,8 @@ }, "node_modules/snakecase-keys": { "version": "5.5.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/snakecase-keys/-/snakecase-keys-5.5.0.tgz", + "integrity": "sha512-r3kRtnoPu3FxGJ3fny6PKNnU3pteb29o6qAa0ugzhSseKNWRkw1dw8nIjXMyyKaU9vQxxVIE62Mb3bKbdrgpiw==", "dependencies": { "map-obj": "^4.1.0", "snake-case": "^3.0.4", @@ -7731,16 +8334,6 @@ "node": ">=12" } }, - "node_modules/snakecase-keys/node_modules/type-fest": { - "version": "3.13.1", - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/source-map": { "version": "0.6.1", "dev": true, @@ -7812,11 +8405,13 @@ }, "node_modules/store2": { "version": "2.14.2", - "license": "(MIT OR GPL-3.0)" + "resolved": "https://registry.npmjs.org/store2/-/store2-2.14.2.tgz", + "integrity": "sha512-siT1RiqlfQnGqgT/YzXVUNsom9S0H1OX+dpdGN1xkyYATo4I6sep5NmsRD/40s3IIOvlCq6akxkqG82urIZW1w==" }, "node_modules/string_decoder": { "version": "1.3.0", - "license": "MIT", + "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" } @@ -7837,6 +8432,19 @@ "node": ">=10" } }, + "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==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-ansi": { "version": "6.0.1", "license": "MIT", @@ -7865,7 +8473,8 @@ }, "node_modules/strip-hex-prefix": { "version": "1.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz", + "integrity": "sha512-q8d4ue7JGEiVcypji1bALTos+0pWtyGlivAWyPuTkHzuTCJqrK9sWxYQZUq6Nq3cuyv3bm734IhHvHtGGURU6A==", "dependencies": { "is-hex-prefixed": "1.0.0" }, @@ -7933,8 +8542,9 @@ } }, "node_modules/symbol-observable": { - "version": "2.0.3", - "license": "MIT", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-4.0.0.tgz", + "integrity": "sha512-b19dMThMV4HVFynSAM1++gBHAbk2Tc/osgLIBZMKsyqh34jb2e8Os7T6ZW/Bt3pJFdBTd2JwAnAAEQV7rSNvcQ==", "engines": { "node": ">=0.10" } @@ -7988,7 +8598,8 @@ }, "node_modules/through2": { "version": "2.0.5", - "license": "MIT", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", "dependencies": { "readable-stream": "~2.3.6", "xtend": "~4.0.1" @@ -7996,11 +8607,13 @@ }, "node_modules/through2/node_modules/isarray": { "version": "1.0.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" }, "node_modules/through2/node_modules/readable-stream": { "version": "2.3.8", - "license": "MIT", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -8013,11 +8626,13 @@ }, "node_modules/through2/node_modules/safe-buffer": { "version": "5.1.2", - "license": "MIT" + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, "node_modules/through2/node_modules/string_decoder": { "version": "1.1.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dependencies": { "safe-buffer": "~5.1.0" } @@ -8084,7 +8699,8 @@ }, "node_modules/ts-invariant": { "version": "0.10.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/ts-invariant/-/ts-invariant-0.10.3.tgz", + "integrity": "sha512-uivwYcQaxAucv1CzRp2n/QdYPo4ILf9VXgH19zEIjFx2EJufV16P0JtJVpYHy89DItG6Kwj2oIUjrcK5au+4tQ==", "dependencies": { "tslib": "^2.1.0" }, @@ -8317,13 +8933,33 @@ "version": "2.6.2", "license": "0BSD" }, + "node_modules/tsx": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.7.0.tgz", + "integrity": "sha512-I+t79RYPlEYlHn9a+KzwrvEwhJg35h/1zHsLC2JXvhC2mdynMv6Zxzvhv5EMV6VF5qJlLlkSnMVvdZV3PSIGcg==", + "dev": true, + "dependencies": { + "esbuild": "~0.19.10", + "get-tsconfig": "^4.7.2" + }, + "bin": { + "tsx": "dist/cli.mjs" + }, + "engines": { + "node": ">=18.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + } + }, "node_modules/tweetnacl": { "version": "1.0.3", "license": "Unlicense" }, "node_modules/tweetnacl-util": { "version": "0.15.1", - "license": "Unlicense" + "resolved": "https://registry.npmjs.org/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz", + "integrity": "sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw==" }, "node_modules/type-detect": { "version": "4.0.8", @@ -8333,6 +8969,17 @@ "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==", + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/typechain": { "version": "8.3.2", "license": "MIT", @@ -8455,7 +9102,8 @@ }, "node_modules/untildify": { "version": "4.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", + "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", "engines": { "node": ">=8" } @@ -8503,7 +9151,8 @@ }, "node_modules/util-deprecate": { "version": "1.0.2", - "license": "MIT" + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, "node_modules/uuid": { "version": "8.3.2", @@ -8544,6 +9193,11 @@ "spdx-expression-parse": "^3.0.0" } }, + "node_modules/vlq": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/vlq/-/vlq-2.0.4.tgz", + "integrity": "sha512-aodjPa2wPQFkra1G8CzJBTHXhgk3EVSwxSWXNPr1fgdFLUb8kvLV1iEb6rFgasIsjP82HWI6dsb5Io26DDnasA==" + }, "node_modules/vscode-oniguruma": { "version": "1.7.0", "dev": true, @@ -8611,6 +9265,22 @@ "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==", + "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", "license": "ISC" @@ -8648,15 +9318,25 @@ }, "node_modules/xstream": { "version": "11.14.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/xstream/-/xstream-11.14.0.tgz", + "integrity": "sha512-1bLb+kKKtKPbgTK6i/BaoAn03g47PpFstlbe1BA+y3pNS/LfvcaghS5BFf9+EE1J+KwSQsEpfJvFN5GqFtiNmw==", "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==", + "engines": { + "node": ">=0.10" + } + }, "node_modules/xtend": { "version": "4.0.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", "engines": { "node": ">=0.4" } @@ -8722,32 +9402,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/yargs/node_modules/emoji-regex": { - "version": "8.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/yargs/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs/node_modules/string-width": { - "version": "4.2.3", - "dev": 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/yargs/node_modules/yargs-parser": { "version": "21.1.1", "dev": true, @@ -8777,56 +9431,49 @@ }, "node_modules/zen-observable": { "version": "0.8.15", - "license": "MIT" + "resolved": "https://registry.npmjs.org/zen-observable/-/zen-observable-0.8.15.tgz", + "integrity": "sha512-PQ2PC7R9rslx84ndNBZB/Dkv8V8fZEpk83RLgXtYd0fwUgEjseMn1Dgajh2x6S8QbZAFa9p2qVCEuYZNgve0dQ==" }, "node_modules/zen-observable-ts": { "version": "1.2.5", - "license": "MIT", + "resolved": "https://registry.npmjs.org/zen-observable-ts/-/zen-observable-ts-1.2.5.tgz", + "integrity": "sha512-QZWQekv6iB72Naeake9hS1KxHlotfRpe+WGNbNx5/ta+R3DNjVO2bswf63gXlWDcs+EMd7XY8HfVQyP1X6T4Zg==", "dependencies": { "zen-observable": "0.8.15" } }, - "platforms/aptos": { - "name": "@wormhole-foundation/connect-sdk-aptos", - "version": "0.3.0-beta.3", - "extraneous": true, + "platforms/algorand": { + "name": "@wormhole-foundation/connect-sdk-algorand", + "version": "0.3.0-beta.6", "license": "Apache-2.0", "dependencies": { - "@wormhole-foundation/connect-sdk": "^0.3.0-beta.3", - "aptos": "1.5.0" + "@wormhole-foundation/connect-sdk": "^0.3.0-beta.6", + "algosdk": "2.7.0" }, "engines": { "node": ">=16" } }, - "platforms/aptos/protocols/core": { - "name": "@wormhole-foundation/connect-sdk-aptos-core", - "version": "0.3.0-beta.3", - "extraneous": true, + "platforms/algorand/protocols/core": { + "name": "@wormhole-foundation/connect-sdk-algorand-core", + "version": "0.3.0-beta.6", "license": "Apache-2.0", "dependencies": { - "@wormhole-foundation/connect-sdk": "^0.3.0-beta.3", - "@wormhole-foundation/connect-sdk-aptos": "^0.3.0-beta.3" - }, - "devDependencies": { - "nock": "^13.3.3" + "@wormhole-foundation/connect-sdk": "^0.3.0-beta.6", + "@wormhole-foundation/connect-sdk-algorand": "^0.3.0-beta.6" }, "engines": { "node": ">=16" } }, - "platforms/aptos/protocols/tokenBridge": { - "name": "@wormhole-foundation/connect-sdk-aptos-tokenbridge", - "version": "0.3.0-beta.3", - "extraneous": true, + "platforms/algorand/protocols/tokenBridge": { + "name": "@wormhole-foundation/connect-sdk-algorand-tokenbridge", + "version": "0.3.0-beta.6", "license": "Apache-2.0", "dependencies": { - "@wormhole-foundation/connect-sdk": "^0.3.0-beta.3", - "@wormhole-foundation/connect-sdk-solana": "^0.3.0-beta.3", - "@wormhole-foundation/connect-sdk-solana-core": "^0.3.0-beta.3" - }, - "devDependencies": { - "nock": "^13.3.3" + "@wormhole-foundation/connect-sdk": "^0.3.0-beta.6", + "@wormhole-foundation/connect-sdk-algorand": "^0.3.0-beta.6", + "@wormhole-foundation/connect-sdk-algorand-core": "^0.3.0-beta.6" }, "engines": { "node": ">=16" @@ -9032,6 +9679,7 @@ "platforms/solana/protocols/cctp": { "name": "@wormhole-foundation/connect-sdk-solana-cctp", "version": "0.3.0-beta.6", + "extraneous": true, "license": "Apache-2.0", "dependencies": { "@coral-xyz/borsh": "0.2.6", @@ -9065,6 +9713,7 @@ "lodash": "^4.17.21" }, "devDependencies": { + "@types/bn.js": "^5.1.5", "nock": "^13.3.3" }, "engines": { @@ -9092,23 +9741,6 @@ "engines": { "node": ">=16" } - }, - "tokenRegistry": { - "name": "@wormhole-foundation/sdk-token-registry", - "version": "0.2.6-beta.1", - "extraneous": true, - "dependencies": { - "@wormhole-foundation/connect-sdk": "^0.2.6-beta.1", - "@wormhole-foundation/connect-sdk-cosmwasm": "^0.2.6-beta.1", - "@wormhole-foundation/connect-sdk-cosmwasm-core": "^0.2.6-beta.1", - "@wormhole-foundation/connect-sdk-cosmwasm-tokenbridge": "^0.2.6-beta.1", - "@wormhole-foundation/connect-sdk-evm": "^0.2.6-beta.1", - "@wormhole-foundation/connect-sdk-evm-core": "^0.2.6-beta.1", - "@wormhole-foundation/connect-sdk-evm-tokenbridge": "^0.2.6-beta.1", - "@wormhole-foundation/connect-sdk-solana": "^0.2.6-beta.1", - "@wormhole-foundation/connect-sdk-solana-core": "^0.2.6-beta.1", - "@wormhole-foundation/connect-sdk-solana-tokenbridge": "^0.2.6-beta.1" - } } } } diff --git a/package.json b/package.json index 498722221..72643c636 100644 --- a/package.json +++ b/package.json @@ -49,17 +49,19 @@ "platforms/solana", "platforms/solana/protocols/core", "platforms/solana/protocols/tokenBridge", - "platforms/solana/protocols/cctp", "platforms/cosmwasm", "platforms/cosmwasm/protocols/core", "platforms/cosmwasm/protocols/tokenBridge", "platforms/cosmwasm/protocols/ibc", + "platforms/algorand", + "platforms/algorand/protocols/core", + "platforms/algorand/protocols/tokenBridge", "examples" ], "unreleased": [ + "tokenRegistry", "platforms/aptos", "platforms/aptos/protocols/core", - "platforms/aptos/protocols/tokenBridge", - "tokenRegistry" + "platforms/aptos/protocols/tokenBridge" ] } \ No newline at end of file diff --git a/platforms/algorand/README.md b/platforms/algorand/README.md new file mode 100644 index 000000000..36a03e3bf --- /dev/null +++ b/platforms/algorand/README.md @@ -0,0 +1,5 @@ +# Algorand Context + +Supported chains: + +- Algorand diff --git a/platforms/algorand/__tests__/unit/address.test.ts b/platforms/algorand/__tests__/unit/address.test.ts new file mode 100644 index 000000000..32663418e --- /dev/null +++ b/platforms/algorand/__tests__/unit/address.test.ts @@ -0,0 +1,16 @@ +import { AlgorandAddress } from "../../src"; + +describe("Algorand Address Tests", () => { + describe("Parse Address", () => { + test("An address parses", () => { + let address = new AlgorandAddress( + "6XHBAFTDDSGTD4AOR67SLCCY7HAQGYBUWCVP2DYPIE7HI7G7IPNOEYM6XE", + ); + expect(address).toBeTruthy(); + }); + + test("An invalid address is rejected", () => { + expect(() => new AlgorandAddress("bogusybogusybogus")).toThrow(); + }); + }); +}); diff --git a/platforms/algorand/eslintrc.json b/platforms/algorand/eslintrc.json new file mode 100644 index 000000000..94b97befc --- /dev/null +++ b/platforms/algorand/eslintrc.json @@ -0,0 +1,20 @@ +{ + "env": { + "node": true + }, + "root": true, + "parser": "@typescript-eslint/parser", + "plugins": ["@typescript-eslint"], + "extends": [ + "eslint:recommended", + "plugin:@typescript-eslint/recommended", + "prettier" + ], + "rules": { + "comma-dangle": ["error", "always-multiline"], + "semi": ["error", "always"], + "@typescript-eslint/explicit-module-boundary-types": ["error"], + "@typescript-eslint/no-non-null-assertion": ["error"], + "@typescript-eslint/no-explicit-any": ["error", { "ignoreRestArgs": true }] + } +} diff --git a/platforms/algorand/jest.config.ts b/platforms/algorand/jest.config.ts new file mode 100644 index 000000000..85f2617de --- /dev/null +++ b/platforms/algorand/jest.config.ts @@ -0,0 +1,17 @@ +import type { JestConfigWithTsJest } from "ts-jest"; + +const jestConfig: JestConfigWithTsJest = { + preset: "ts-jest", + verbose: true, + modulePathIgnorePatterns: ["mocks"], + transform: { + "^.+\\.tsx?$": [ + "ts-jest", + { + isolatedModules: true, + }, + ], + }, +}; + +export default jestConfig; diff --git a/platforms/algorand/package.json b/platforms/algorand/package.json new file mode 100644 index 000000000..aacda7021 --- /dev/null +++ b/platforms/algorand/package.json @@ -0,0 +1,49 @@ +{ + "name": "@wormhole-foundation/connect-sdk-algorand", + "version": "0.3.0-beta.6", + "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", + "module": "./dist/esm/index.js", + "types": "./dist/esm/index.d.ts", + "author": "", + "description": "SDK for Algorand, used in conjunction with @wormhole-foundation/connect-sdk", + "files": [ + "dist/**/*" + ], + "keywords": [ + "wormhole", + "sdk", + "typescript", + "connect", + "algorand" + ], + "engines": { + "node": ">=16" + }, + "sideEffects": false, + "scripts": { + "build:cjs": "tsc -p ./tsconfig.cjs.json", + "build:esm": "tsc -p ./tsconfig.esm.json", + "build": "npm run build:cjs && npm run build:esm", + "rebuild": "npm run clean && npm run build:cjs && npm run build:esm", + "clean": "rm -rf ./dist && rm -f ./*.tsbuildinfo", + "lint": "npm run prettier && eslint --fix", + "prettier": "prettier --write ./src", + "test": "jest --config ./jest.config.ts" + }, + "dependencies": { + "@wormhole-foundation/connect-sdk": "^0.3.0-beta.6", + "algosdk": "2.7.0" + } +} \ No newline at end of file diff --git a/platforms/algorand/protocols/core/package.json b/platforms/algorand/protocols/core/package.json new file mode 100644 index 000000000..5075823a7 --- /dev/null +++ b/platforms/algorand/protocols/core/package.json @@ -0,0 +1,48 @@ +{ + "name": "@wormhole-foundation/connect-sdk-algorand-core", + "version": "0.3.0-beta.6", + "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", + "module": "./dist/esm/index.js", + "types": "./dist/esm/index.d.ts", + "author": "", + "description": "SDK for Algorand, used in conjunction with @wormhole-foundation/connect-sdk", + "files": [ + "dist/**/*" + ], + "keywords": [ + "wormhole", + "sdk", + "typescript", + "connect", + "algorand" + ], + "engines": { + "node": ">=16" + }, + "sideEffects": false, + "scripts": { + "build:cjs": "tsc -p ./tsconfig.cjs.json", + "build:esm": "tsc -p ./tsconfig.esm.json", + "build": "npm run build:cjs && npm run build:esm", + "rebuild": "npm run clean && npm run build:cjs && npm run build:esm", + "clean": "rm -rf ./dist && rm -f ./*.tsbuildinfo", + "lint": "npm run prettier && eslint --fix", + "prettier": "prettier --write ./src" + }, + "dependencies": { + "@wormhole-foundation/connect-sdk": "^0.3.0-beta.6", + "@wormhole-foundation/connect-sdk-algorand": "^0.3.0-beta.6" + } +} \ No newline at end of file diff --git a/platforms/algorand/protocols/core/src/core.ts b/platforms/algorand/protocols/core/src/core.ts new file mode 100644 index 000000000..d77028cdd --- /dev/null +++ b/platforms/algorand/protocols/core/src/core.ts @@ -0,0 +1,407 @@ +import { + keccak256, + serialize, + ChainId, + ChainsConfig, + Contracts, + Network, + VAA, + WormholeCore, + WormholeMessageId, + encoding, + toChainId, +} from "@wormhole-foundation/connect-sdk"; +import { + AlgorandAddress, + AlgorandChains, + AlgorandPlatform, + AlgorandPlatformType, + AlgorandUnsignedTransaction, + AnyAlgorandAddress, + TransactionSet, + TransactionSignerPair, + safeBigIntToNumber, +} from "@wormhole-foundation/connect-sdk-algorand"; +import { + Algodv2, + LogicSigAccount, + OnApplicationComplete, + SuggestedParams, + Transaction, + getApplicationAddress, + makeApplicationCallTxnFromObject, + makeApplicationOptInTxnFromObject, + makePaymentTxnWithSuggestedParamsFromObject, + modelsv2, + signLogicSigTransaction, +} from "algosdk"; + +import { SEED_AMT, StorageLogicSig } from "./storage"; + +export class AlgorandWormholeCore + implements WormholeCore +{ + readonly chainId: ChainId; + readonly coreAppId: bigint; + readonly coreAppAddress: string; + readonly tokenBridgeAppId: bigint; + readonly tokenBridgeAppAddress: string; + + static MAX_SIGS_PER_TXN: number = 6; + static ALGO_VERIFY_HASH = "EZATROXX2HISIRZDRGXW4LRQ46Z6IUJYYIHU3PJGP7P5IQDPKVX42N767A"; + static ALGO_VERIFY = new Uint8Array([ + 6, 32, 4, 1, 0, 32, 20, 38, 1, 0, 49, 32, 50, 3, 18, 68, 49, 1, 35, 18, 68, 49, 16, 129, 6, 18, + 68, 54, 26, 1, 54, 26, 3, 54, 26, 2, 136, 0, 3, 68, 34, 67, 53, 2, 53, 1, 53, 0, 40, 53, 240, + 40, 53, 241, 52, 0, 21, 53, 5, 35, 53, 3, 35, 53, 4, 52, 3, 52, 5, 12, 65, 0, 68, 52, 1, 52, 0, + 52, 3, 129, 65, 8, 34, 88, 23, 52, 0, 52, 3, 34, 8, 36, 88, 52, 0, 52, 3, 129, 33, 8, 36, 88, 7, + 0, 53, 241, 53, 240, 52, 2, 52, 4, 37, 88, 52, 240, 52, 241, 80, 2, 87, 12, 20, 18, 68, 52, 3, + 129, 66, 8, 53, 3, 52, 4, 37, 8, 53, 4, 66, 255, 180, 34, 137, + ]); + + // global state key for message fee + static feeKey = encoding.b64.encode("MessageFee"); + // method selector for verifying a VAA + static verifyVaa = encoding.bytes.encode("verifyVAA"); + // method selector for verifying signatures of a VAA + static verifySigs = encoding.bytes.encode("verifySigs"); + // method selector string for publishing a message + static publishMessage = encoding.bytes.encode("publishMessage"); + + constructor( + readonly network: N, + readonly chain: C, + readonly connection: Algodv2, + readonly contracts: Contracts, + ) { + this.chainId = toChainId(chain); + + if (!contracts.coreBridge) { + throw new Error(`Core contract address for chain ${chain} not found`); + } + const core = BigInt(contracts.coreBridge); + this.coreAppId = core; + this.coreAppAddress = getApplicationAddress(core); + + if (!contracts.tokenBridge) { + throw new Error(`TokenBridge contract address for chain ${chain} not found`); + } + const tokenBridge = BigInt(contracts.tokenBridge); + this.tokenBridgeAppId = tokenBridge; + this.tokenBridgeAppAddress = getApplicationAddress(tokenBridge); + } + + async *verifyMessage(sender: AnyAlgorandAddress, vaa: VAA, appId?: bigint) { + const address = new AlgorandAddress(sender).toString(); + const txset = await AlgorandWormholeCore.submitVAAHeader( + this.connection, + this.coreAppId, + appId ?? this.coreAppId, + vaa, + address, + ); + + for (const tx of txset.txs) { + yield this.createUnsignedTx(tx, "Core.verifyMessage"); + } + } + + static async fromRpc( + connection: Algodv2, + config: ChainsConfig, + ): Promise> { + const [network, chain] = await AlgorandPlatform.chainFromRpc(connection); + const conf = config[chain]!; + if (conf.network !== network) + throw new Error(`Network mismatch: ${conf.network} !== ${network}`); + return new AlgorandWormholeCore(network as N, chain, connection, conf.contracts); + } + + async *publishMessage(sender: AnyAlgorandAddress, message: Uint8Array) { + // Call core bridge to publish message + const _sender = new AlgorandAddress(sender); + const address = _sender.toString(); + const suggestedParams = await this.connection.getTransactionParams().do(); + + const storage = StorageLogicSig.forEmitter(this.coreAppId, _sender.toUint8Array()); + + const { + accounts: [storageAddress], + txs, + } = await AlgorandWormholeCore.maybeCreateStorageTx( + this.connection, + address, + this.coreAppId, + storage, + suggestedParams, + ); + + for (const tx of txs) { + yield this.createUnsignedTx(tx, "Core.publishMessage", true); + } + + const act = makeApplicationCallTxnFromObject({ + from: address, + appIndex: safeBigIntToNumber(this.coreAppId), + appArgs: [AlgorandWormholeCore.publishMessage, message, encoding.bignum.toBytes(0n, 8)], + accounts: [storageAddress], + onComplete: OnApplicationComplete.NoOpOC, + suggestedParams, + }); + + yield this.createUnsignedTx({ tx: act }, "Core.publishMessage", true); + } + + /** + * Return the message fee for the core bridge + * @param client An Algodv2 client + * @param bridgeId The application ID of the core bridge + * @returns Promise with the message fee for the core bridge + */ + async getMessageFee(): Promise { + const applInfoResp: Record = await this.connection + .getApplicationByID(safeBigIntToNumber(this.coreAppId)) + .do(); + const appInfo = modelsv2.Application.from_obj_for_encoding(applInfoResp); + const val = appInfo.params.globalState.find((kv) => kv.key === AlgorandWormholeCore.feeKey); + return val ? BigInt(val.value.uint) : 0n; + } + + async parseTransaction(txId: string): Promise { + const result = await this.connection.pendingTransactionInformation(txId).do(); + const ptr = modelsv2.PendingTransactionResponse.from_obj_for_encoding(result); + return this.parseTx(ptr); + } + + private parseTx(ptr: modelsv2.PendingTransactionResponse): WormholeMessageId[] { + const msgs: WormholeMessageId[] = []; + + if (ptr.innerTxns && ptr.innerTxns.length > 0) { + msgs.push(...ptr.innerTxns.flatMap((tx) => this.parseTx(tx))); + } + + // Expect target is core app + if (BigInt(ptr.txn.txn.apid) !== this.coreAppId) return msgs; + + // Expect logs + if (!ptr.logs || ptr.logs.length === 0) return msgs; + + // Expect publish messeage as first arg + const args = ptr.txn.txn.apaa; + if ( + args.length !== 3 || + !encoding.bytes.equals(new Uint8Array(args[0]), AlgorandWormholeCore.publishMessage) + ) + return msgs; + + const sequence = encoding.bignum.decode(ptr.logs[0]); + const emitter = new AlgorandAddress(ptr.txn.txn.snd).toUniversalAddress(); + msgs.push({ chain: this.chain, emitter, sequence }); + + return msgs; + } + + /** + * Constructs opt in transactions + * @param client An Algodv2 client + * @param senderAddr Sender address + * @param appId Application ID + * @param storage StorageLogicSig + * @returns Address and array of TransactionSignerPairs + */ + static async maybeCreateStorageTx( + client: Algodv2, + senderAddr: string, + appId: bigint, + storage: LogicSigAccount, + suggestedParams?: SuggestedParams, + ): Promise { + const appAddr: string = getApplicationAddress(appId); + const storageAddress = storage.address(); + + const txs: TransactionSignerPair[] = []; + + if (await StorageLogicSig.storageAccountExists(client, storageAddress, appId)) + return { accounts: [storageAddress], txs }; + + suggestedParams = suggestedParams ?? (await client.getTransactionParams().do()); + + // Pay the storage account some ALGO to min balance requirements + const seedTxn = makePaymentTxnWithSuggestedParamsFromObject({ + from: senderAddr, + to: storageAddress, + amount: SEED_AMT, + suggestedParams, + }); + seedTxn.fee = seedTxn.fee * 2; + txs.push({ tx: seedTxn, signer: null }); + + // Opt in to the app and rekey to the app address that is using + // this as storage + const optinTxn = makeApplicationOptInTxnFromObject({ + from: storageAddress, + appIndex: safeBigIntToNumber(appId), + rekeyTo: appAddr, + suggestedParams, + }); + optinTxn.fee = 0; + txs.push({ + tx: optinTxn, + signer: { + address: storage.address(), + signTxn: (txn: Transaction) => Promise.resolve(signLogicSigTransaction(txn, storage).blob), + }, + }); + + return { + accounts: [storageAddress], + txs, + }; + } + + /** + * Submits just the header of the VAA + * @param client AlgodV2 client + * @param bridgeId Application ID of the core bridge + * @param vaa The VAA (just the header is used) + * @param senderAddr Sending account address + * @param appid Application ID + * @returns Promise with current VAA state + */ + static async submitVAAHeader( + client: Algodv2, + coreId: bigint, + appid: bigint, + vaa: VAA, + senderAddr: string, + suggestedParams?: SuggestedParams, + ): Promise { + suggestedParams = suggestedParams ?? (await client.getTransactionParams().do()); + + let txs: TransactionSignerPair[] = []; + + // Get storage acct for message ID + const msgStorage = StorageLogicSig.forMessageId(appid, { + chain: vaa.emitterChain, + sequence: vaa.sequence, + emitter: vaa.emitterAddress, + }); + const { + accounts: [seqAddr], + txs: seqOptInTxs, + } = await AlgorandWormholeCore.maybeCreateStorageTx( + client, + senderAddr, + appid, + msgStorage, + suggestedParams, + ); + txs.push(...seqOptInTxs); + + // Get storage account for Guardian set + const gsStorage = StorageLogicSig.forGuardianSet(coreId, vaa.guardianSet); + const { + accounts: [guardianAddr], + txs: guardianOptInTxs, + } = await AlgorandWormholeCore.maybeCreateStorageTx( + client, + senderAddr, + coreId, + gsStorage, + suggestedParams, + ); + txs.push(...guardianOptInTxs); + + let accts: string[] = [seqAddr, guardianAddr]; + + // Get the Guardian keys + const keys: Uint8Array = await StorageLogicSig.decodeLocalState(client, coreId, guardianAddr); + + // We don't pass the entire payload in but instead just pass it pre-digested. This gets around size + // limitations with lsigs AND reduces the cost of the entire operation on a congested network by reducing the + // bytes passed into the transaction + // This is a 2 pass digest + const digest = keccak256(vaa.hash); + + // How many signatures can we process in a single txn... we can do 6! + // There are likely upwards of 19 signatures. So, we ned to split things up + const numSigs: number = vaa.signatures.length; + const numTxns: number = Math.floor(numSigs / AlgorandWormholeCore.MAX_SIGS_PER_TXN) + 1; + + const SIG_LEN: number = 66; + const GuardianKeyLen: number = 20; + const lsa = new LogicSigAccount(AlgorandWormholeCore.ALGO_VERIFY); + + for (let nt = 0; nt < numTxns; nt++) { + let sigs = vaa.signatures.slice(nt, nt + AlgorandWormholeCore.MAX_SIGS_PER_TXN); + + // The keyset is the set of Guardians that correspond + // to the current set of signatures in this loop. + // Each signature in 20 bytes and comes from decodeLocalState() + let arraySize: number = sigs.length * GuardianKeyLen; + let keySet: Uint8Array = new Uint8Array(arraySize); + + for (let i = 0; i < sigs.length; i++) { + // The first byte of the sig is the relative index of that signature in the signatures array + // Use that index to get the appropriate Guardian key + const sig = sigs[i * SIG_LEN]; + const key = keys.slice( + sig.guardianIndex * GuardianKeyLen + 1, + (sig.guardianIndex + 1) * GuardianKeyLen + 1, + ); + keySet.set(key, i * 20); + } + + const appTxn = makeApplicationCallTxnFromObject({ + appArgs: [ + AlgorandWormholeCore.verifySigs, + encoding.bytes.concat( + ...sigs.map((s) => + encoding.bytes.concat(new Uint8Array([s.guardianIndex]), s.signature.encode()), + ), + ), + keySet, + digest, + ], + accounts: accts, + appIndex: safeBigIntToNumber(coreId), + from: AlgorandWormholeCore.ALGO_VERIFY_HASH, + onComplete: OnApplicationComplete.NoOpOC, + suggestedParams, + }); + appTxn.fee = 0; + txs.push({ + tx: appTxn, + signer: { + address: lsa.address(), + signTxn: (txn: Transaction) => Promise.resolve(signLogicSigTransaction(txn, lsa).blob), + }, + }); + } + const appTxn = makeApplicationCallTxnFromObject({ + appArgs: [AlgorandWormholeCore.verifyVaa, serialize(vaa)], + accounts: accts, + appIndex: safeBigIntToNumber(coreId), + from: senderAddr, + onComplete: OnApplicationComplete.NoOpOC, + suggestedParams, + }); + appTxn.fee = appTxn.fee * (2 + numTxns); // Was 1 + txs.push({ tx: appTxn, signer: null }); + + return { accounts: accts, txs }; + } + + private createUnsignedTx( + txReq: TransactionSignerPair, + description: string, + parallelizable: boolean = true, // Default true for Algorand atomic transaction grouping + ): AlgorandUnsignedTransaction { + return new AlgorandUnsignedTransaction( + txReq, + this.network, + this.chain, + description, + parallelizable, + ); + } +} diff --git a/platforms/algorand/protocols/core/src/index.ts b/platforms/algorand/protocols/core/src/index.ts new file mode 100644 index 000000000..687fe6c92 --- /dev/null +++ b/platforms/algorand/protocols/core/src/index.ts @@ -0,0 +1,16 @@ +import { _platform } from "@wormhole-foundation/connect-sdk-algorand"; +import { registerProtocol } from "@wormhole-foundation/connect-sdk"; +import { AlgorandWormholeCore } from "./core"; + +declare global { + namespace WormholeNamespace { + export interface PlatformToProtocolMapping { + Algorand: {}; + } + } +} + +registerProtocol(_platform, "WormholeCore", AlgorandWormholeCore); + +export * from "./core"; +export * from "./storage"; diff --git a/platforms/algorand/protocols/core/src/storage.ts b/platforms/algorand/protocols/core/src/storage.ts new file mode 100644 index 000000000..29dd2f0cd --- /dev/null +++ b/platforms/algorand/protocols/core/src/storage.ts @@ -0,0 +1,257 @@ +import { + Chain, + TokenId, + WormholeMessageId, + encoding, + toChainId, +} from "@wormhole-foundation/connect-sdk"; +import { Algodv2, LogicSigAccount, decodeAddress, getApplicationAddress, modelsv2 } from "algosdk"; +import { safeBigIntToNumber } from "@wormhole-foundation/connect-sdk-algorand"; + +export const SEED_AMT: number = 1002000; +export const MAX_KEYS: number = 15; +export const MAX_BYTES_PER_KEY: number = 127; +export const BITS_PER_BYTE: number = 8; +export const BITS_PER_KEY: number = MAX_BYTES_PER_KEY * BITS_PER_BYTE; +export const MAX_BYTES: number = MAX_BYTES_PER_KEY * MAX_KEYS; +export const MAX_BITS: number = BITS_PER_BYTE * MAX_BYTES; + +export interface PopulateData { + appId: bigint; // App ID we're storing data for + appAddress: Uint8Array; // Address for the emitter, contract or Guardian + address: Uint8Array; + idx: bigint; +} + +// Useful for encoding numbers as varints to patch TEAL binary +export const varint = { + // Forever grateful to https://github.com/joeltg/big-varint/blob/main/src/unsigned.ts + _limit: 0x7f, + encodingLength: (value: number) => { + let i = 0; + for (; value >= 0x80; i++) value >>= 7; + return i + 1; + }, + encode: (i: bigint | number, buffer?: ArrayBuffer, byteOffset?: number) => { + if (typeof i === "bigint") i = safeBigIntToNumber(i); + + if (i < 0) throw new RangeError("value must be unsigned"); + + const byteLength = varint.encodingLength(i); + buffer = buffer || new ArrayBuffer(byteLength); + byteOffset = byteOffset || 0; + + if (buffer.byteLength < byteOffset + byteLength) + throw new RangeError("the buffer is too small to encode the number at the offset"); + + const array = new Uint8Array(buffer, byteOffset); + + let offset = 0; + while (varint._limit < i) { + array[offset++] = (i & varint._limit) | 0x80; + i >>= 7; + } + array[offset] = Number(i); + return array; + }, + decode: (data: Uint8Array, offset = 0) => { + let i = 0; + let n = 0; + let b: number | undefined; + do { + b = data[offset + n]; + if (b === undefined) throw new RangeError("offset out of range"); + + i += (b & varint._limit) << (n * 7); + n++; + } while (0x80 <= b); + return i; + }, +}; + +export const StorageLogicSig = { + // Get the storage lsig for a Wormhole message ID + forMessageId: (appId: bigint, whm: WormholeMessageId) => { + const appAddress = decodeAddress(getApplicationAddress(appId)).publicKey; + const emitterAddr = whm.emitter.toUniversalAddress().toUint8Array(); + const chainIdBytes = encoding.bignum.toBytes(BigInt(toChainId(whm.chain)), 2); + const address = encoding.bytes.concat(chainIdBytes, emitterAddr); + + return StorageLogicSig.fromData({ + appId, + appAddress, + idx: whm.sequence / BigInt(MAX_BITS), + address, + }); + }, + // Get the storage lsig for a wrapped asset + forWrappedAsset: (appId: bigint, token: TokenId) => { + const appAddress = decodeAddress(getApplicationAddress(appId)).publicKey; + return StorageLogicSig.fromData({ + appId, + appAddress, + idx: BigInt(toChainId(token.chain)), + address: token.address.toUniversalAddress().toUint8Array(), + }); + }, + // Get the storage lsig for a native asset + forNativeAsset: (appId: bigint, tokenId: bigint) => { + const appAddress = decodeAddress(getApplicationAddress(appId)).publicKey; + return StorageLogicSig.fromData({ + appId, + appAddress, + idx: tokenId, + address: encoding.bytes.encode("native"), + }); + }, + // Get the storage lsig for the guardian set + forGuardianSet: (appId: bigint, idx: bigint | number) => { + const appAddress = decodeAddress(getApplicationAddress(appId)).publicKey; + return StorageLogicSig.fromData({ + appId, + appAddress, + idx: BigInt(idx), + address: encoding.bytes.encode("guardian"), + }); + }, + forEmitter: (appId: bigint, emitter: Uint8Array) => { + const appAddress = decodeAddress(getApplicationAddress(appId)).publicKey; + return StorageLogicSig.fromData({ + appId, + appAddress, + idx: 0n, + address: emitter, + }); + }, + _encode: (data: bigint | Uint8Array) => { + if (typeof data === "bigint") return [encoding.hex.encode(varint.encode(data))]; + return [encoding.hex.encode(varint.encode(data.length)), encoding.hex.encode(data)]; + }, + fromData: (data: PopulateData) => { + // This patches the binary of the TEAL program used to store data + // to produce a logic sig that can be used to sign transactions + // to store data in the its account local state for a given app + const byteStrings = [ + "0620010181", + ...StorageLogicSig._encode(data.idx), + "4880", + ...StorageLogicSig._encode(data.address), + "483110810612443119221244311881", + ...StorageLogicSig._encode(data.appId), + "1244312080", + ...StorageLogicSig._encode(data.appAddress), + "124431018100124431093203124431153203124422", + ]; + + const bytecode = encoding.hex.decode(byteStrings.join("")); + return new LogicSigAccount(bytecode); + }, + + /** + * Returns the local data for an application ID + * @param client Algodv2 client + * @param appId Application ID of interest + * @param address Address of the account + * @returns Promise with Uint8Array of data squirreled away + */ + decodeLocalState: async (client: Algodv2, appId: bigint, address: string) => { + let appState: modelsv2.ApplicationLocalState | undefined; + try { + const ai = await client + .accountApplicationInformation(address, safeBigIntToNumber(appId)) + .do(); + const acctAppInfo = modelsv2.AccountApplicationResponse.from_obj_for_encoding(ai); + appState = acctAppInfo.appLocalState; + } catch (e) { + return new Uint8Array(); + } + + const metaKey = encoding.b64.encode("meta"); + + // We don't want the data in the `meta` key + // and we want to make sure the sequences come back in order + // so first put them in a map by numeric key + // then iterate over keys to concat them in the right order + let vals = new Map(); + for (const kv of appState.keyValue) { + if (kv.key === metaKey) continue; + + // Take the first byte off the key to be the + // numeric index + const key = encoding.b64.decode(kv.key)[0]; + const value = encoding.b64.decode(kv.value.bytes); + vals.set(key, value); + } + + const byteArrays: Uint8Array[] = []; + for (let i = 0; i < MAX_KEYS; i++) { + if (vals.has(i)) byteArrays.push(vals.get(i)); + } + + return encoding.bytes.concat(...byteArrays); + }, + + /** + * This function is used to check if a VAA has been redeemed by looking at a specific bit + * @param client AlgodV2 client + * @param appId Application Id + * @param addr Wallet address. Someone has to pay for this + * @param seq The sequence number of the redemption + * @returns True, if the bit was set and VAA was redeemed, False otherwise + */ + checkBitsSet: async (client: Algodv2, appId: bigint, addr: string, seq: bigint) => { + let retval: boolean = false; + let appState: modelsv2.TealKeyValue[] | undefined; + const acctInfoResp = await client.accountInformation(addr).do(); + const acctInfo = modelsv2.Account.from_obj_for_encoding(acctInfoResp); + const als = acctInfo.appsLocalState; + als && + als.forEach((app) => { + if (BigInt(app.id) === appId) { + appState = app.keyValue; + } + }); + if (appState?.length === 0) { + return retval; + } + + const BIG_MAX_BITS: bigint = BigInt(MAX_BITS); + const BIG_EIGHT: bigint = BigInt(8); + // Start on a MAX_BITS boundary + const start: bigint = (seq / BIG_MAX_BITS) * BIG_MAX_BITS; + // beg should be in the range [0..MAX_BITS] + const beg: number = safeBigIntToNumber(seq - start); + // s should be in the range [0..15] + const s: number = Math.floor(beg / BITS_PER_KEY); + const b: number = Math.floor((beg - s * BITS_PER_KEY) / 8); + + const key = encoding.b64.encode(encoding.bignum.toBytes(s, 1)); + + appState?.forEach((kv) => { + if (kv.key === key) { + const v = Buffer.from(kv.value.bytes, "base64"); + const bt = 1 << safeBigIntToNumber(seq % BIG_EIGHT); + retval = (v[b]! & bt) != 0; // Added non-null assertion + return; + } + }); + return retval; + }, + + /** + * Checks to see if the account exists for the application + * @param client An Algodv2 client + * @param appId Application ID + * @param acctAddr Account address to check + * @returns True, if account exists for application, False otherwise + */ + storageAccountExists: async (client: Algodv2, address: string, appId: bigint) => { + try { + const acctAppInfo = await client + .accountApplicationInformation(address, safeBigIntToNumber(appId)) + .do(); + return Object.keys(acctAppInfo).length > 0; + } catch {} + return false; + }, +}; diff --git a/platforms/algorand/protocols/core/tsconfig.cjs.json b/platforms/algorand/protocols/core/tsconfig.cjs.json new file mode 100644 index 000000000..73a0e681f --- /dev/null +++ b/platforms/algorand/protocols/core/tsconfig.cjs.json @@ -0,0 +1,8 @@ +{ + "extends": "../../../../tsconfig.cjs.json", + "include": ["src"], + "compilerOptions": { + "outDir": "dist/cjs", + "rootDir": "src" + } +} diff --git a/platforms/algorand/protocols/core/tsconfig.esm.json b/platforms/algorand/protocols/core/tsconfig.esm.json new file mode 100644 index 000000000..a9c110d37 --- /dev/null +++ b/platforms/algorand/protocols/core/tsconfig.esm.json @@ -0,0 +1,8 @@ +{ + "extends": "../../../../tsconfig.esm.json", + "include": ["src"], + "compilerOptions": { + "outDir": "dist/esm", + "rootDir": "src" + } +} diff --git a/platforms/algorand/protocols/core/typedoc.json b/platforms/algorand/protocols/core/typedoc.json new file mode 100644 index 000000000..f2fbd427c --- /dev/null +++ b/platforms/algorand/protocols/core/typedoc.json @@ -0,0 +1,4 @@ +{ + "extends": ["../../../../typedoc.base.json"], + "entryPoints": ["src/index.ts"], + } \ No newline at end of file diff --git a/platforms/algorand/protocols/tokenBridge/package.json b/platforms/algorand/protocols/tokenBridge/package.json new file mode 100644 index 000000000..2fdf949bc --- /dev/null +++ b/platforms/algorand/protocols/tokenBridge/package.json @@ -0,0 +1,49 @@ +{ + "name": "@wormhole-foundation/connect-sdk-algorand-tokenbridge", + "version": "0.3.0-beta.6", + "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", + "module": "./dist/esm/index.js", + "types": "./dist/esm/index.d.ts", + "author": "", + "description": "SDK for Algorand, used in conjunction with @wormhole-foundation/connect-sdk", + "files": [ + "dist/**/*" + ], + "keywords": [ + "wormhole", + "sdk", + "typescript", + "connect", + "algorand" + ], + "engines": { + "node": ">=16" + }, + "sideEffects": false, + "scripts": { + "build:cjs": "tsc -p ./tsconfig.cjs.json", + "build:esm": "tsc -p ./tsconfig.esm.json", + "build": "npm run build:cjs && npm run build:esm", + "rebuild": "npm run clean && npm run build:cjs && npm run build:esm", + "clean": "rm -rf ./dist && rm -f ./*.tsbuildinfo", + "lint": "npm run prettier && eslint --fix", + "prettier": "prettier --write ./src" + }, + "dependencies": { + "@wormhole-foundation/connect-sdk": "^0.3.0-beta.6", + "@wormhole-foundation/connect-sdk-algorand": "^0.3.0-beta.6", + "@wormhole-foundation/connect-sdk-algorand-core": "^0.3.0-beta.6" + } +} \ No newline at end of file diff --git a/platforms/algorand/protocols/tokenBridge/src/index.ts b/platforms/algorand/protocols/tokenBridge/src/index.ts new file mode 100644 index 000000000..354f400a2 --- /dev/null +++ b/platforms/algorand/protocols/tokenBridge/src/index.ts @@ -0,0 +1,15 @@ +import { _platform } from "@wormhole-foundation/connect-sdk-algorand"; +import { registerProtocol } from "@wormhole-foundation/connect-sdk"; +import { AlgorandTokenBridge } from "./tokenBridge"; + +declare global { + namespace WormholeNamespace { + export interface PlatformToProtocolMapping { + Algorand: {}; + } + } +} + +registerProtocol(_platform, "TokenBridge", AlgorandTokenBridge); + +export * from "./tokenBridge"; diff --git a/platforms/algorand/protocols/tokenBridge/src/tokenBridge.ts b/platforms/algorand/protocols/tokenBridge/src/tokenBridge.ts new file mode 100644 index 000000000..e9b175f0d --- /dev/null +++ b/platforms/algorand/protocols/tokenBridge/src/tokenBridge.ts @@ -0,0 +1,697 @@ +import { + AccountAddress, + Chain, + ChainAddress, + ChainId, + ChainsConfig, + Contracts, + NativeAddress, + Network, + Platform, + TokenAddress, + TokenBridge, + TokenId, + UniversalAddress, + UnsignedTransaction, + encoding, + serialize, + toChain, + toChainId, + toNative, +} from "@wormhole-foundation/connect-sdk"; +import { + AlgorandAddress, + AlgorandChains, + AlgorandPlatform, + AlgorandPlatformType, + AlgorandUnsignedTransaction, + AnyAlgorandAddress, + TransactionSignerPair, + safeBigIntToNumber, +} from "@wormhole-foundation/connect-sdk-algorand"; +import { + AlgorandWormholeCore, + StorageLogicSig, +} from "@wormhole-foundation/connect-sdk-algorand-core"; +import { + ABIMethod, + ABIType, + Algodv2, + OnApplicationComplete, + SuggestedParams, + bigIntToBytes, + decodeAddress, + getApplicationAddress, + makeApplicationCallTxnFromObject, + makeAssetTransferTxnWithSuggestedParamsFromObject, + makePaymentTxnWithSuggestedParamsFromObject, + modelsv2, +} from "algosdk"; + +import "@wormhole-foundation/connect-sdk-algorand-core"; + +export const TransferMethodSelector = ABIMethod.fromSignature("portal_transfer(byte[])byte[]"); + +export class AlgorandTokenBridge + implements TokenBridge +{ + readonly chainId: ChainId; + + readonly coreBridge: AlgorandWormholeCore; + readonly coreAppId: bigint; + readonly coreAppAddress: string; + + readonly tokenBridgeAppId: bigint; + readonly tokenBridgeAddress: string; + + static sendTransfer = encoding.bytes.encode("sendTransfer"); + static attestToken = encoding.bytes.encode("attestToken"); + static noop = encoding.bytes.encode("nop"); + static optIn = encoding.bytes.encode("optin"); + static completeTransfer = encoding.bytes.encode("completeTransfer"); + static receiveAttest = encoding.bytes.encode("receiveAttest"); + + constructor( + readonly network: N, + readonly chain: C, + readonly connection: Algodv2, + readonly contracts: Contracts, + ) { + this.chainId = toChainId(chain); + + if (!contracts.coreBridge) { + throw new Error(`Core contract address for chain ${chain} not found`); + } + const core = BigInt(contracts.coreBridge); + this.coreAppId = core; + this.coreAppAddress = getApplicationAddress(core); + this.coreBridge = new AlgorandWormholeCore(network, chain, connection, contracts); + + if (!contracts.tokenBridge) { + throw new Error(`TokenBridge contract address for chain ${chain} not found`); + } + const tokenBridge = BigInt(contracts.tokenBridge); + this.tokenBridgeAppId = tokenBridge; + this.tokenBridgeAddress = getApplicationAddress(tokenBridge); + } + + static async fromRpc( + provider: Algodv2, + config: ChainsConfig, + ): Promise> { + const [network, chain] = await AlgorandPlatform.chainFromRpc(provider); + + const conf = config[chain]!; + if (conf.network !== network) + throw new Error(`Network mismatch: ${conf.network} != ${network}`); + + return new AlgorandTokenBridge(network as N, chain, provider, conf.contracts); + } + + // Checks a native address to see if it's a wrapped version + async isWrappedAsset(token: TokenAddress): Promise { + const assetId = new AlgorandAddress(token).toInt(); + + if (assetId === 0) return false; + + const assetInfoResp = await this.connection.getAssetByID(assetId).do(); + const asset = modelsv2.Asset.from_obj_for_encoding(assetInfoResp); + + const creatorAddr = asset.params.creator; + const creatorAcctInfoResp = await this.connection + .accountInformation(creatorAddr) + .exclude("all") + .do(); + const creator = modelsv2.Account.from_obj_for_encoding(creatorAcctInfoResp); + const isWrapped: boolean = creator?.authAddr === this.tokenBridgeAddress; + return isWrapped; + } + + // Returns the original asset with its foreign chain + async getOriginalAsset(token: TokenAddress): Promise { + const assetId = new AlgorandAddress(token).toInt(); + + const assetInfoResp = await this.connection.getAssetByID(assetId).do(); + const assetInfo = modelsv2.Asset.from_obj_for_encoding(assetInfoResp); + const decodedLocalState = await StorageLogicSig.decodeLocalState( + this.connection, + this.tokenBridgeAppId, + assetInfo.params.creator, + ); + + if (decodedLocalState.length < 94) throw new Error("Invalid local state data"); + + const chainBytes = decodedLocalState.slice(92, 94); + const chain = toChain(encoding.bignum.decode(chainBytes)); + const address = new UniversalAddress(decodedLocalState.slice(60, 60 + 32)); + + return { chain, address }; + } + + // Returns the address of the native version of this asset + async getWrappedAsset(token: TokenId): Promise> { + const storageAccount = StorageLogicSig.forWrappedAsset(this.tokenBridgeAppId, token); + const data = await StorageLogicSig.decodeLocalState( + this.connection, + this.tokenBridgeAppId, + storageAccount.address(), + ); + + if (data.length < 8) throw new Error("Invalid wrapped asset data"); + const nativeAddress = toNative(this.chain, encoding.bignum.decode(data.slice(0, 8)).toString()); + return nativeAddress; + } + + // Checks if a wrapped version exists + async hasWrappedAsset(token: TokenId): Promise { + try { + await this.getWrappedAsset(token); + return true; + } catch {} + return false; + } + + async getWrappedNative(): Promise> { + return toNative(this.chain, "0"); + } + + async isTransferCompleted(vaa: TokenBridge.TransferVAA): Promise { + const messageStorage = StorageLogicSig.forMessageId(this.tokenBridgeAppId, { + sequence: vaa.sequence, + chain: vaa.emitterChain, + emitter: vaa.emitterAddress, + }); + try { + return await StorageLogicSig.checkBitsSet( + this.connection, + this.tokenBridgeAppId, + messageStorage.address(), + vaa.sequence, + ); + } catch {} + return false; + } + + // Creates a Token Attestation VAA containing metadata about + // the token that may be submitted to a Token Bridge on another chain + // to allow it to create a wrapped version of the token + async *createAttestation( + token: AnyAlgorandAddress, + payer: AnyAlgorandAddress, + ): AsyncGenerator> { + if (!payer) throw new Error("Payer required to create attestation"); + + const senderAddr = new AlgorandAddress(payer).toString(); + const assetId = new AlgorandAddress(token).toInt(); + + const txs: TransactionSignerPair[] = []; + + const suggestedParams: SuggestedParams = await this.connection.getTransactionParams().do(); + + const tbs = StorageLogicSig.forEmitter( + this.coreAppId, + new AlgorandAddress(this.tokenBridgeAddress).toUint8Array(), + ); + + const { + accounts: [emitterAddr], + txs: emitterOptInTxs, + } = await AlgorandWormholeCore.maybeCreateStorageTx( + this.connection, + senderAddr, + this.coreAppId, + tbs, + suggestedParams, + ); + txs.push(...emitterOptInTxs); + + let creatorAddr = ""; + let creatorAcctInfo; + + if (assetId !== 0) { + const assetInfoResp = await this.connection.getAssetByID(assetId).do(); + const assetInfo = modelsv2.Asset.from_obj_for_encoding(assetInfoResp); + const creatorAcctInfoResp = await this.connection + .accountInformation(assetInfo.params.creator) + .do(); + creatorAcctInfo = modelsv2.Account.from_obj_for_encoding(creatorAcctInfoResp); + if (creatorAcctInfo.authAddr === this.tokenBridgeAddress.toString()) { + throw new Error("Cannot re-attest wormhole assets"); + } + } + + const nativeStorageAcct = StorageLogicSig.forNativeAsset( + this.tokenBridgeAppId, + BigInt(assetId), + ); + const txns = await AlgorandWormholeCore.maybeCreateStorageTx( + this.connection, + senderAddr, + this.tokenBridgeAppId, + nativeStorageAcct, + ); + creatorAddr = txns.accounts[0]!; + txs.push(...txns.txs); + + const firstTxn = makeApplicationCallTxnFromObject({ + from: senderAddr, + appIndex: safeBigIntToNumber(this.tokenBridgeAppId), + onComplete: OnApplicationComplete.NoOpOC, + appArgs: [AlgorandTokenBridge.noop], + suggestedParams, + }); + txs.push({ tx: firstTxn, signer: null }); + + const mfee = await this.coreBridge.getMessageFee(); + if (mfee > BigInt(0)) { + const feeTxn = makePaymentTxnWithSuggestedParamsFromObject({ + from: senderAddr, + suggestedParams, + to: this.tokenBridgeAddress, + amount: mfee, + }); + txs.push({ tx: feeTxn, signer: null }); + } + + let accts: string[] = [emitterAddr, creatorAddr, this.coreAppAddress]; + + if (creatorAcctInfo) { + accts.push(creatorAcctInfo.address); + } + + let appTxn = makeApplicationCallTxnFromObject({ + appArgs: [AlgorandTokenBridge.attestToken, encoding.bignum.toBytes(assetId, 8)], + accounts: accts, + appIndex: safeBigIntToNumber(this.tokenBridgeAppId), + foreignApps: [safeBigIntToNumber(this.coreAppId)], + foreignAssets: [assetId], + from: senderAddr, + onComplete: OnApplicationComplete.NoOpOC, + suggestedParams, + }); + if (mfee > BigInt(0)) { + appTxn.fee *= 3; + } else { + appTxn.fee *= 2; + } + txs.push({ tx: appTxn, signer: null }); + + for (const utxn of txs) { + yield this.createUnsignedTx(utxn, "TokenBridge.createAttestation", true); + } + } + + // Submits the Token Attestation VAA to the Token Bridge + // to create the wrapped token represented by the data in the VAA + async *submitAttestation( + vaa: TokenBridge.AttestVAA, + sender: AnyAlgorandAddress, + suggestedParams?: SuggestedParams, + ): AsyncGenerator> { + if (!suggestedParams) suggestedParams = await this.connection.getTransactionParams().do(); + + const senderAddr = sender.toString(); + + const tokenStorage = StorageLogicSig.forWrappedAsset(this.tokenBridgeAppId, vaa.payload.token); + const tokenStorageAddress = tokenStorage.address(); + + const txs: TransactionSignerPair[] = []; + const foreignAssets: number[] = []; + + const data: Uint8Array = await StorageLogicSig.decodeLocalState( + this.connection, + this.tokenBridgeAppId, + tokenStorageAddress, + ); + + if (data.length > 8) { + foreignAssets.push(new AlgorandAddress(data.slice(0, 8)).toInt()); + } + + txs.push({ + tx: makePaymentTxnWithSuggestedParamsFromObject({ + from: senderAddr, + to: tokenStorageAddress, + amount: 100000, + suggestedParams, + }), + }); + + let buf: Uint8Array = new Uint8Array(1); + buf[0] = 0x01; + txs.push({ + tx: makeApplicationCallTxnFromObject({ + appArgs: [AlgorandTokenBridge.noop, buf], + appIndex: safeBigIntToNumber(this.tokenBridgeAppId), + from: senderAddr, + onComplete: OnApplicationComplete.NoOpOC, + suggestedParams, + }), + }); + + buf = new Uint8Array(1); + buf[0] = 0x02; + txs.push({ + tx: makeApplicationCallTxnFromObject({ + appArgs: [AlgorandTokenBridge.noop, buf], + appIndex: safeBigIntToNumber(this.tokenBridgeAppId), + from: senderAddr, + onComplete: OnApplicationComplete.NoOpOC, + suggestedParams, + }), + }); + + txs.push({ + tx: makeApplicationCallTxnFromObject({ + accounts: [], // TODO: + appArgs: [AlgorandTokenBridge.receiveAttest, serialize(vaa)], + appIndex: safeBigIntToNumber(this.tokenBridgeAppId), + foreignAssets: foreignAssets, + from: senderAddr, + onComplete: OnApplicationComplete.NoOpOC, + suggestedParams, + }), + }); + + txs[txs.length - 1].tx.fee = txs[txs.length - 1].tx.fee * 2; // QUESTIONBW: There are like 3 different ways of adjusting fees in various functions--this should be standardized + + for (const utxn of txs) { + yield this.createUnsignedTx(utxn, "TokenBridge.submitAttestation", true); + } + } + + async *transfer( + sender: AccountAddress, + recipient: ChainAddress, + token: TokenAddress, + amount: bigint, + payload?: Uint8Array, + ): AsyncGenerator> { + const senderAddr = sender.toString(); + const assetId = token === "native" ? 0 : new AlgorandAddress(token).toInt(); + const qty = amount; + const chainId = toChainId(recipient.chain); + const receiver = recipient.address.toUniversalAddress().toUint8Array(); + + const suggestedParams: SuggestedParams = await this.connection.getTransactionParams().do(); + + const fee = BigInt(0); + + const tbs = StorageLogicSig.fromData({ + appId: this.coreAppId, + appAddress: decodeAddress(this.coreAppAddress).publicKey, + idx: BigInt(0), + address: decodeAddress(this.tokenBridgeAddress).publicKey, + }); + + const txs: TransactionSignerPair[] = []; + const { + accounts: [emitterAddr], + txs: emitterOptInTxs, + } = await AlgorandWormholeCore.maybeCreateStorageTx( + this.connection, + senderAddr, + this.coreAppId, + tbs, + suggestedParams, + ); + txs.push(...emitterOptInTxs); + + // Check that the auth address of the creator + // is the token bridge + let creator = ""; + let creatorAcct: modelsv2.Account | undefined; + let wormhole: boolean = false; + if (assetId !== 0) { + const assetInfoResp: Record = await this.connection.getAssetByID(assetId).do(); + const asset = modelsv2.Asset.from_obj_for_encoding(assetInfoResp); + creator = asset.params.creator; + + const creatorAcctInfoResp = await this.connection.accountInformation(creator).do(); + creatorAcct = modelsv2.Account.from_obj_for_encoding(creatorAcctInfoResp); + wormhole = creatorAcct.authAddr === this.tokenBridgeAddress.toString(); + } + + const msgFee: bigint = await this.coreBridge.getMessageFee(); + if (msgFee > 0) + txs.push({ + tx: makePaymentTxnWithSuggestedParamsFromObject({ + from: senderAddr, + to: this.tokenBridgeAddress, + amount: msgFee, + suggestedParams, + }), + signer: null, + }); + + if (!wormhole) { + const nativeStorageAccount = StorageLogicSig.forNativeAsset( + this.tokenBridgeAppId, + BigInt(assetId), + ); + const { + accounts: [address], + txs, + } = await AlgorandWormholeCore.maybeCreateStorageTx( + this.connection, + senderAddr, + this.tokenBridgeAppId, + nativeStorageAccount, + suggestedParams, + ); + creator = address; + txs.push(...txs); + } + + if ( + assetId !== 0 && + !(await AlgorandTokenBridge.isOptedInToAsset(this.connection, creator, assetId)) + ) { + // Looks like we need to optin + const payTxn = makePaymentTxnWithSuggestedParamsFromObject({ + from: senderAddr, + to: creator, + amount: 100000, + suggestedParams, + }); + txs.unshift({ tx: payTxn, signer: null }); + // The tokenid app needs to do the optin since it has signature authority + let txn = makeApplicationCallTxnFromObject({ + from: senderAddr, + appIndex: safeBigIntToNumber(this.tokenBridgeAppId), + onComplete: OnApplicationComplete.NoOpOC, + appArgs: [AlgorandTokenBridge.optIn, bigIntToBytes(assetId, 8)], + foreignAssets: [assetId], + accounts: [creator], + suggestedParams, + }); + txn.fee *= 2; + txs.unshift({ tx: txn, signer: null }); + } + + const t = makeApplicationCallTxnFromObject({ + from: senderAddr, + appIndex: safeBigIntToNumber(this.tokenBridgeAppId), + onComplete: OnApplicationComplete.NoOpOC, + appArgs: [AlgorandTokenBridge.noop], + suggestedParams, + }); + txs.push({ tx: t, signer: null }); + + let accounts: string[] = []; + if (assetId === 0) { + const t = makePaymentTxnWithSuggestedParamsFromObject({ + from: senderAddr, + to: creator, + amount: qty, + suggestedParams, + }); + txs.push({ tx: t, signer: null }); + accounts = [emitterAddr, creator, creator]; + } else { + const t = makeAssetTransferTxnWithSuggestedParamsFromObject({ + from: senderAddr, + to: creator, + amount: qty, + assetIndex: assetId, + suggestedParams, + }); + txs.push({ tx: t, signer: null }); + accounts = creatorAcct?.address + ? [emitterAddr, creator, creatorAcct.address] + : [emitterAddr, creator]; + } + + const args = [ + AlgorandTokenBridge.sendTransfer, + encoding.bignum.toBytes(assetId, 8), + encoding.bignum.toBytes(qty, 8), + receiver, + encoding.bignum.toBytes(chainId, 8), + encoding.bignum.toBytes(fee, 8), + ]; + + if (payload) args.push(payload); + + const acTxn = makeApplicationCallTxnFromObject({ + from: senderAddr, + appIndex: safeBigIntToNumber(this.tokenBridgeAppId), + onComplete: OnApplicationComplete.NoOpOC, + appArgs: args, + foreignApps: [safeBigIntToNumber(this.coreAppId)], + foreignAssets: [assetId], + accounts: accounts, + suggestedParams, + }); + acTxn.fee *= 2; + txs.push({ tx: acTxn, signer: null }); + + for (const utxn of txs) { + yield this.createUnsignedTx(utxn, "TokenBridge.transfer", true); + } + } + + async *redeem( + sender: AnyAlgorandAddress, + vaa: TokenBridge.TransferVAA, + unwrapNative: boolean = true, + suggestedParams?: SuggestedParams, + ) { + if (!suggestedParams) suggestedParams = await this.connection.getTransactionParams().do(); + + const senderAddr = new AlgorandAddress(sender).toString(); + + const { accounts, txs } = await AlgorandWormholeCore.submitVAAHeader( + this.connection, + this.coreAppId, + this.tokenBridgeAppId, + vaa, + senderAddr, + ); + + const tokenStorage = StorageLogicSig.forWrappedAsset(this.tokenBridgeAppId, vaa.payload.token); + const tokenStorageAddress = tokenStorage.address(); + + let foreignAssets: number[] = []; + let assetId: number = 0; + if (vaa.payload.token.chain !== this.chain) { + const data = await StorageLogicSig.decodeLocalState( + this.connection, + this.tokenBridgeAppId, + tokenStorageAddress, + ); + assetId = new AlgorandAddress(data.slice(0, 8)).toInt(); + } else { + assetId = new AlgorandAddress(vaa.payload.token.address).toInt(); + } + accounts.push(tokenStorageAddress); + + let appId = 0; + let receiverAddress = ""; + if (vaa.payloadName === "TransferWithPayload") { + appId = new AlgorandAddress(vaa.payload.to.address).toInt(); + receiverAddress = getApplicationAddress(appId); + } else { + receiverAddress = new AlgorandAddress(vaa.payload.to.address.toUint8Array()).toString(); + } + accounts.push(receiverAddress); + + if (assetId !== 0) { + foreignAssets.push(assetId); + if ( + !(await AlgorandTokenBridge.isOptedInToAsset(this.connection, receiverAddress, assetId)) + ) { + if (senderAddr != receiverAddress) { + throw new Error("Cannot ASA optin for somebody else (asset " + assetId.toString() + ")"); + } + + // push asset opt in to the front + txs.unshift({ + tx: makeAssetTransferTxnWithSuggestedParamsFromObject({ + amount: 0, + assetIndex: assetId, + from: senderAddr, + suggestedParams, + to: senderAddr, + }), + signer: null, + }); + } + } + + const appCallObj = { + accounts: accounts, + appArgs: [AlgorandTokenBridge.completeTransfer, serialize(vaa)], + appIndex: safeBigIntToNumber(this.tokenBridgeAppId), + foreignAssets: foreignAssets, + from: senderAddr, + onComplete: OnApplicationComplete.NoOpOC, + suggestedParams, + }; + + txs.push({ + tx: makeApplicationCallTxnFromObject(appCallObj), + signer: null, + }); + + // We need to cover the inner transactions + txs[txs.length - 1].tx.fee = + txs[txs.length - 1].tx.fee * + (vaa.payloadName === "Transfer" && vaa.payload.fee !== undefined && vaa.payload.fee === 0n + ? 2 + : 3); + + if (vaa.payloadName === "TransferWithPayload") { + txs[txs.length - 1].tx.appForeignApps = [appId]; + + txs.push({ + tx: makeApplicationCallTxnFromObject({ + appArgs: [ + TransferMethodSelector.getSelector(), + (TransferMethodSelector.args[0].type as ABIType).encode(serialize(vaa)), + ], + appIndex: appId, + foreignAssets: foreignAssets, + from: senderAddr, + onComplete: OnApplicationComplete.NoOpOC, + suggestedParams, + }), + signer: null, + }); + } + + for (const utxn of txs) { + yield this.createUnsignedTx(utxn, "TokenBridge.redeem", true); + } + } + + /** + * Checks if the asset has been opted in by the receiver + * @param client Algodv2 client + * @param asset Algorand asset index + * @param receiver Account address + * @returns Promise with True if the asset was opted in, False otherwise + */ + static async isOptedInToAsset(client: Algodv2, address: string, asset: number): Promise { + try { + const acctInfoResp = await client.accountAssetInformation(address, asset).do(); + const acctInfo = modelsv2.AccountAssetResponse.from_obj_for_encoding(acctInfoResp); + return acctInfo.assetHolding.amount > 0; + } catch {} + return false; + } + + private createUnsignedTx( + txReq: TransactionSignerPair, + description: string, + parallelizable: boolean = true, // Default true for Algorand atomic transaction grouping + ): AlgorandUnsignedTransaction { + return new AlgorandUnsignedTransaction( + txReq, + this.network, + this.chain, + description, + parallelizable, + ); + } +} diff --git a/platforms/algorand/protocols/tokenBridge/tsconfig.cjs.json b/platforms/algorand/protocols/tokenBridge/tsconfig.cjs.json new file mode 100644 index 000000000..73a0e681f --- /dev/null +++ b/platforms/algorand/protocols/tokenBridge/tsconfig.cjs.json @@ -0,0 +1,8 @@ +{ + "extends": "../../../../tsconfig.cjs.json", + "include": ["src"], + "compilerOptions": { + "outDir": "dist/cjs", + "rootDir": "src" + } +} diff --git a/platforms/algorand/protocols/tokenBridge/tsconfig.esm.json b/platforms/algorand/protocols/tokenBridge/tsconfig.esm.json new file mode 100644 index 000000000..a9c110d37 --- /dev/null +++ b/platforms/algorand/protocols/tokenBridge/tsconfig.esm.json @@ -0,0 +1,8 @@ +{ + "extends": "../../../../tsconfig.esm.json", + "include": ["src"], + "compilerOptions": { + "outDir": "dist/esm", + "rootDir": "src" + } +} diff --git a/platforms/algorand/protocols/tokenBridge/typedoc.json b/platforms/algorand/protocols/tokenBridge/typedoc.json new file mode 100644 index 000000000..f2fbd427c --- /dev/null +++ b/platforms/algorand/protocols/tokenBridge/typedoc.json @@ -0,0 +1,4 @@ +{ + "extends": ["../../../../typedoc.base.json"], + "entryPoints": ["src/index.ts"], + } \ No newline at end of file diff --git a/platforms/algorand/src/address.ts b/platforms/algorand/src/address.ts new file mode 100644 index 000000000..95085f4f5 --- /dev/null +++ b/platforms/algorand/src/address.ts @@ -0,0 +1,95 @@ +import { + Address, + Platform, + UniversalAddress, + encoding, + registerNative, +} from "@wormhole-foundation/connect-sdk"; + +import { AlgorandPlatform } from "./platform"; +import { _platform, AnyAlgorandAddress, safeBigIntToNumber } from "./types"; +import { decodeAddress, encodeAddress, isValidAddress } from "algosdk"; + +export const AlgorandZeroAddress = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ"; + +// Note: for ASA/App IDs we encode them as 8 bytes at the start of +// the 32 byte adddress bytes. + +export class AlgorandAddress implements Address { + static readonly byteSize = 32; + static readonly platform: Platform = _platform; + + readonly type: string = "Native"; + + private readonly address: Uint8Array; + + constructor(address: AnyAlgorandAddress) { + if (AlgorandAddress.instanceof(address)) { + this.address = address.address; + } else if (UniversalAddress.instanceof(address)) { + this.address = address.toUint8Array(); + } else if (address instanceof Uint8Array && address.byteLength === AlgorandAddress.byteSize) { + this.address = address; + } else if (typeof address === "string" && isValidAddress(address)) { + this.address = decodeAddress(address).publicKey; + } else if (typeof address === "string" && !isNaN(parseInt(address))) { + this.address = encoding.bytes.zpad( + encoding.bignum.toBytes(BigInt(address), 8), + AlgorandAddress.byteSize, + ); + } else if (typeof address === "bigint") { + this.address = encoding.bytes.zpad( + encoding.bignum.toBytes(address, 8), + AlgorandAddress.byteSize, + ); + } else if (address instanceof Uint8Array && address.byteLength === 8) { + this.address = encoding.bytes.zpad(address, AlgorandAddress.byteSize); + } else throw new Error(`Invalid Algorand address or ASA ID: ${address}`); + } + + unwrap(): string { + return this.toString(); + } + toString() { + return encodeAddress(this.address); + } + toNative() { + return this; + } + toUint8Array() { + return this.address; + } + toUniversalAddress() { + return new UniversalAddress(this.toUint8Array()); + } + + toBigInt(): bigint { + return encoding.bignum.decode(this.toUint8Array().slice(24, 32)); + } + + toInt(): number { + return safeBigIntToNumber(this.toBigInt()); + } + + equals(other: AlgorandAddress | UniversalAddress): boolean { + if (AlgorandAddress.instanceof(other)) { + return other.address === this.address; + } else { + return this.toUniversalAddress().equals(other); + } + } + static instanceof(address: any): address is AlgorandAddress { + return address.constructor.platform === AlgorandPlatform._platform; + } +} + +declare global { + namespace WormholeNamespace { + interface PlatformToNativeAddressMapping { + // @ts-ignore + Algorand: AlgorandAddress; + } + } +} + +registerNative(_platform, AlgorandAddress); diff --git a/platforms/algorand/src/chain.ts b/platforms/algorand/src/chain.ts new file mode 100644 index 000000000..79047384e --- /dev/null +++ b/platforms/algorand/src/chain.ts @@ -0,0 +1,7 @@ +import { Chain, ChainContext, Network } from "@wormhole-foundation/connect-sdk"; +import { AlgorandChains, AlgorandPlatformType } from "./types"; + +export class AlgorandChain< + N extends Network = Network, + C extends Chain = AlgorandChains, +> extends ChainContext {} diff --git a/platforms/algorand/src/index.ts b/platforms/algorand/src/index.ts new file mode 100644 index 000000000..b8c76a0f6 --- /dev/null +++ b/platforms/algorand/src/index.ts @@ -0,0 +1,7 @@ +export * from "./address"; +export * from "./chain"; +export * from "./platform"; +export * from "./types"; +export * from "./unsignedTransaction"; + +export * as testing from "./testing"; diff --git a/platforms/algorand/src/platform.ts b/platforms/algorand/src/platform.ts new file mode 100644 index 000000000..280150ff2 --- /dev/null +++ b/platforms/algorand/src/platform.ts @@ -0,0 +1,197 @@ +import { + Balances, + Chain, + ChainsConfig, + Network, + PlatformContext, + SignedTx, + TokenId, + TxHash, + Wormhole, + chainToPlatform, + decimals, + nativeChainIds, + networkPlatformConfigs, +} from "@wormhole-foundation/connect-sdk"; +import { + Algodv2, + SignedTransaction, + decodeSignedTransaction, + modelsv2, + waitForConfirmation, +} from "algosdk"; +import { AlgorandAddress, AlgorandZeroAddress } from "./address"; +import { AlgorandChain } from "./chain"; +import { AlgorandChains, AlgorandPlatformType, AnyAlgorandAddress, _platform } from "./types"; + +/** + * @category Algorand + */ +export class AlgorandPlatform extends PlatformContext { + static _platform = _platform; + + constructor(network: N, _config?: ChainsConfig) { + super(network, _config ?? networkPlatformConfigs(network, AlgorandPlatform._platform)); + } + + getRpc(chain: C): Algodv2 { + if (chain in this.config) return new Algodv2("", this.config[chain]!.rpc); + throw new Error("No configuration available for chain: " + chain); + } + + getChain(chain: C): AlgorandChain { + if (chain in this.config) return new AlgorandChain(chain, this); + throw new Error("No configuration available for chain: " + chain); + } + + static nativeTokenId( + network: N, + chain: C, + ): TokenId { + if (!AlgorandPlatform.isSupportedChain(chain)) + throw new Error(`invalid chain for ${_platform}: ${chain}`); + return Wormhole.chainAddress(chain, AlgorandZeroAddress); + } + + static isNativeTokenId( + network: N, + chain: C, + tokenId: TokenId, + ): boolean { + if (!AlgorandPlatform.isSupportedChain(chain)) return false; + if (tokenId.chain !== chain) return false; + const native = this.nativeTokenId(network, chain); + return native == tokenId; + } + + static isSupportedChain(chain: Chain): boolean { + const platform = chainToPlatform(chain); + return platform === AlgorandPlatform._platform; + } + + static hexToUint8Array = (h: string): Uint8Array => { + if (h.startsWith("0x")) h = h.slice(2); + return new Uint8Array(Buffer.from(h, "hex")); + }; + + static async getDecimals( + chain: Chain, + rpc: Algodv2, + token: AnyAlgorandAddress | "native", + ): Promise { + // It may come in as a universal address + const assetId = token === "native" ? 0 : new AlgorandAddress(token).toInt(); + + if (assetId === 0) return BigInt(decimals.nativeDecimals(AlgorandPlatform._platform)); + + const assetResp = await rpc.getAssetByID(assetId).do(); + const asset = modelsv2.Asset.from_obj_for_encoding(assetResp); + if (!asset.params || !asset.params.decimals) throw new Error("Could not fetch token details"); + return BigInt(asset.params.decimals); + } + + static async getBalance( + chain: Chain, + rpc: Algodv2, + walletAddr: string, + token: AnyAlgorandAddress | "native", + ): Promise { + const assetId = token === "native" ? 0 : new AlgorandAddress(token).toInt(); + if (assetId === 0) { + const resp = await rpc.accountInformation(walletAddr).do(); + const accountInfo = modelsv2.Account.from_obj_for_encoding(resp); + return BigInt(accountInfo.amount); + } + + const acctAssetInfoResp = await rpc.accountAssetInformation(walletAddr, assetId).do(); + const accountAssetInfo = modelsv2.AssetHolding.from_obj_for_encoding(acctAssetInfoResp); + return BigInt(accountAssetInfo.amount); + } + + static async getBalances( + chain: Chain, + rpc: Algodv2, + walletAddr: string, + tokens: (AnyAlgorandAddress | "native")[], + ): Promise { + let native: bigint; + if (tokens.includes("native")) { + const acctInfoResp = await rpc.accountInformation(walletAddr).do(); + const accountInfo = modelsv2.Account.from_obj_for_encoding(acctInfoResp); + native = BigInt(accountInfo.amount); + } + const balancesArr = tokens.map(async (token) => { + if (token === "native") { + return { ["native"]: native }; + } + const asaId = new AlgorandAddress(token).toInt(); + const acctAssetInfoResp = await rpc.accountAssetInformation(walletAddr, asaId).do(); + const accountAssetInfo = modelsv2.AssetHolding.from_obj_for_encoding(acctAssetInfoResp); + return BigInt(accountAssetInfo.amount); + }); + + return balancesArr.reduce((obj, item) => Object.assign(obj, item), {}); + } + + static async sendWait(chain: Chain, rpc: Algodv2, stxns: SignedTx[]): Promise { + const rounds = 4; + + const decodedStxns: SignedTransaction[] = stxns.map((val, idx) => { + const decodedStxn: SignedTransaction = decodeSignedTransaction(val); + return decodedStxn; + }); + + const txIds: string[] = decodedStxns.map((val, idx) => { + const id: string = val.txn.txID(); + return id; + }); + + const { txId } = await rpc.sendRawTransaction(stxns).do(); + if (!txId) { + throw new Error("Transaction(s) failed to send"); + } + const confirmResp = await waitForConfirmation(rpc, txId, rounds); + const ptr = modelsv2.PendingTransactionResponse.from_obj_for_encoding(confirmResp); + if (!ptr.confirmedRound) { + throw new Error(`Transaction(s) could not be confirmed in ${rounds} rounds`); + } + + return txIds; + } + + static async getLatestBlock(rpc: Algodv2): Promise { + const statusResp = await rpc.status().do(); + const status = modelsv2.NodeStatusResponse.from_obj_for_encoding(statusResp); + if (!status.lastRound) { + throw new Error("Error getting status from node"); + } + return Number(status.lastRound); + } + + static async getLatestFinalizedBlock(rpc: Algodv2): Promise { + const statusResp = await rpc.status().do(); + const status = modelsv2.NodeStatusResponse.from_obj_for_encoding(statusResp); + if (!status.lastRound) { + throw new Error("Error getting status from node"); + } + return Number(status.lastRound); + } + + static chainFromChainId(genesisId: string): [Network, AlgorandChains] { + const networkChainPair = nativeChainIds.platformNativeChainIdToNetworkChain( + AlgorandPlatform._platform, + genesisId, + ); + + if (networkChainPair === undefined) throw new Error(`Unknown native chain id ${genesisId}`); + + const [network, chain] = networkChainPair; + return [network, chain]; + } + + static async chainFromRpc(rpc: Algodv2): Promise<[Network, AlgorandChains]> { + const versionResp = await rpc.versionsCheck().do(); + const version = modelsv2.Version.from_obj_for_encoding(versionResp); + return this.chainFromChainId(version.genesisId); + } +} diff --git a/platforms/algorand/src/testing/index.ts b/platforms/algorand/src/testing/index.ts new file mode 100644 index 000000000..5282af685 --- /dev/null +++ b/platforms/algorand/src/testing/index.ts @@ -0,0 +1 @@ +export * from "./signer"; diff --git a/platforms/algorand/src/testing/signer.ts b/platforms/algorand/src/testing/signer.ts new file mode 100644 index 000000000..406a70c06 --- /dev/null +++ b/platforms/algorand/src/testing/signer.ts @@ -0,0 +1,77 @@ +import { + Network, + SignOnlySigner, + SignedTx, + Signer, + UnsignedTransaction, +} from "@wormhole-foundation/connect-sdk"; +import { Account, Algodv2, assignGroupID, mnemonicToSecretKey } from "algosdk"; +import { AlgorandChains, TransactionSignerPair } from "../types"; +import { AlgorandPlatform } from "../platform"; + +export async function getAlgorandSigner( + rpc: Algodv2, + mnemonic: string, // 25-word Algorand mnemonic +): Promise { + const [network, chain] = await AlgorandPlatform.chainFromRpc(rpc); + return new AlgorandSigner(chain, rpc, mnemonic); +} + +// AlgorandSigner implements SignOnlySender +export class AlgorandSigner + implements SignOnlySigner +{ + _account: Account; + constructor( + private _chain: C, + _rpc: Algodv2, + mnemonic: string, + private _debug: boolean = false, + ) { + this._account = mnemonicToSecretKey(mnemonic); + } + + chain(): C { + return this._chain; + } + + address(): string { + return this._account.addr; + } + + async sign(unsignedTxns: UnsignedTransaction[]): Promise { + const signed: Uint8Array[] = []; + const ungrouped = unsignedTxns.map((val, idx) => { + return val.transaction.tx; + }); + const grouped = assignGroupID(ungrouped); + + // Replace the ungrouped Transactions with grouped Transactions + const groupedAlgoUnsignedTxns = unsignedTxns.map((val, idx) => { + val.transaction.tx = grouped[idx]; + return val; + }); + + for (const algoUnsignedTxn of groupedAlgoUnsignedTxns) { + const { description, transaction: tsp } = algoUnsignedTxn; + const { tx, signer } = tsp as TransactionSignerPair; + + if (this._debug) { + console.log(tx._getDictForDisplay()); + console.log(tx.txID()); + } + + if (signer) { + console.log( + `Signing: ${description} with signer ${signer.address} for address ${this.address()}`, + ); + signed.push(await signer.signTxn(tx)); + } else { + console.log(`Signing: ${description} without signer for address ${this.address()}`); + signed.push(tx.signTxn(this._account.sk)); + } + } + + return signed; + } +} diff --git a/platforms/algorand/src/types.ts b/platforms/algorand/src/types.ts new file mode 100644 index 000000000..e78928d8f --- /dev/null +++ b/platforms/algorand/src/types.ts @@ -0,0 +1,31 @@ +import { PlatformToChains, UniversalOrNative } from "@wormhole-foundation/connect-sdk"; +import { Transaction } from "algosdk"; + +export const _platform: "Algorand" = "Algorand"; +export type AlgorandPlatformType = typeof _platform; + +export type AlgorandChains = PlatformToChains; +export type UniversalOrAlgorand = UniversalOrNative; +export type AnyAlgorandAddress = UniversalOrAlgorand | string | Uint8Array | bigint; + +export type LsigSigner = { + address: string; + signTxn(txn: Transaction): Promise; +}; + +export type TransactionSignerPair = { + tx: Transaction; + signer?: LsigSigner; +}; + +export type TransactionSet = { + accounts: string[]; + txs: TransactionSignerPair[]; +}; + +export function safeBigIntToNumber(b: bigint): number { + if (b < BigInt(Number.MIN_SAFE_INTEGER) || b > BigInt(Number.MAX_SAFE_INTEGER)) { + throw new Error("Integer is unsafe"); + } + return Number(b); +} diff --git a/platforms/algorand/src/unsignedTransaction.ts b/platforms/algorand/src/unsignedTransaction.ts new file mode 100644 index 000000000..5322b04d7 --- /dev/null +++ b/platforms/algorand/src/unsignedTransaction.ts @@ -0,0 +1,14 @@ +import { Network, UnsignedTransaction } from "@wormhole-foundation/connect-sdk"; +import { AlgorandChains, TransactionSignerPair } from "./types"; + +export class AlgorandUnsignedTransaction + implements UnsignedTransaction +{ + constructor( + readonly transaction: TransactionSignerPair, + readonly network: N, + readonly chain: C, + readonly description: string, + readonly parallelizable: boolean = false, + ) {} +} diff --git a/platforms/algorand/tsconfig.cjs.json b/platforms/algorand/tsconfig.cjs.json new file mode 100644 index 000000000..b5ef75178 --- /dev/null +++ b/platforms/algorand/tsconfig.cjs.json @@ -0,0 +1,8 @@ +{ + "extends": "../../tsconfig.cjs.json", + "include": ["src"], + "compilerOptions": { + "outDir": "dist/cjs", + "rootDir": "src" + } +} diff --git a/platforms/algorand/tsconfig.esm.json b/platforms/algorand/tsconfig.esm.json new file mode 100644 index 000000000..84bbdce2d --- /dev/null +++ b/platforms/algorand/tsconfig.esm.json @@ -0,0 +1,8 @@ +{ + "extends": "../../tsconfig.esm.json", + "include": ["src"], + "compilerOptions": { + "outDir": "dist/esm", + "rootDir": "src" + } +} diff --git a/platforms/algorand/typedoc.json b/platforms/algorand/typedoc.json new file mode 100644 index 000000000..e12797d62 --- /dev/null +++ b/platforms/algorand/typedoc.json @@ -0,0 +1,4 @@ +{ + "extends": ["../../typedoc.base.json"], + "entryPoints": ["src/index.ts"], + } \ No newline at end of file diff --git a/platforms/solana/protocols/core/package.json b/platforms/solana/protocols/core/package.json index a64b4111f..afafaefe9 100644 --- a/platforms/solana/protocols/core/package.json +++ b/platforms/solana/protocols/core/package.json @@ -42,6 +42,7 @@ "prettier": "prettier --write ./src" }, "devDependencies": { + "@types/bn.js": "^5.1.5", "nock": "^13.3.3" }, "dependencies": { diff --git a/platforms/solana/protocols/tokenBridge/src/tokenBridge.ts b/platforms/solana/protocols/tokenBridge/src/tokenBridge.ts index a51677d5d..dc50305e7 100644 --- a/platforms/solana/protocols/tokenBridge/src/tokenBridge.ts +++ b/platforms/solana/protocols/tokenBridge/src/tokenBridge.ts @@ -183,7 +183,9 @@ export class SolanaTokenBridge return toNative(this.chain, mint.toBase58()); } catch (_) {} - throw ErrNotWrapped(token.address.toUniversalAddress().toString()); + throw ErrNotWrapped( + `${mint}: ${token.address.toUniversalAddress().toString()}`, + ); } async isTransferCompleted(vaa: TokenBridge.TransferVAA): Promise { diff --git a/platforms/solana/src/address.ts b/platforms/solana/src/address.ts index 0171ddc80..a6bed507f 100644 --- a/platforms/solana/src/address.ts +++ b/platforms/solana/src/address.ts @@ -21,8 +21,7 @@ export class SolanaAddress implements Address { constructor(address: AnySolanaAddress) { if (SolanaAddress.instanceof(address)) { - const a = address as unknown as SolanaAddress; - this.address = a.address; + this.address = address.address; } else if (UniversalAddress.instanceof(address)) { this.address = new PublicKey(address.toUint8Array()); } else if (typeof address === 'string' && encoding.hex.valid(address)) { @@ -39,13 +38,13 @@ export class SolanaAddress implements Address { return this.address.toBase58(); } toUint8Array() { - return this.address.toBytes(); + return new Uint8Array(this.address.toBytes()); } toNative() { return this; } toUniversalAddress() { - return new UniversalAddress(this.address.toBytes()); + return new UniversalAddress(this.toUint8Array()); } static instanceof(address: any): address is SolanaAddress { diff --git a/platforms/solana/src/testing/signer.ts b/platforms/solana/src/testing/signer.ts index e8ca7fb87..b7eb40fc6 100644 --- a/platforms/solana/src/testing/signer.ts +++ b/platforms/solana/src/testing/signer.ts @@ -1,4 +1,4 @@ -import { Connection, Keypair } from '@solana/web3.js'; +import { Connection, Keypair, Transaction } from '@solana/web3.js'; import { SignOnlySigner, Signer, @@ -27,6 +27,7 @@ export class SolanaSigner constructor( private _chain: C, private _keypair: Keypair, + private _debug: boolean = false, ) {} chain(): C { @@ -43,17 +44,18 @@ export class SolanaSigner const { description, transaction } = txn; console.log(`Signing: ${description} for ${this.address()}`); - // Uncomment for debug - // const st = transaction as Transaction; - // console.log(st.signatures); - // console.log(st.feePayer); - // st.instructions.forEach((ix) => { - // console.log('Program', ix.programId.toBase58()); - // console.log('Data: ', ix.data.toString('hex')); - // ix.keys.forEach((k) => { - // console.log(k, k.pubkey.toBase58()); - // }); - // }); + if (this._debug) { + const st = transaction as Transaction; + console.log(st.signatures); + console.log(st.feePayer); + st.instructions.forEach((ix) => { + console.log('Program', ix.programId.toBase58()); + console.log('Data: ', ix.data.toString('hex')); + ix.keys.forEach((k) => { + console.log(k, k.pubkey.toBase58()); + }); + }); + } transaction.partialSign(this._keypair); signed.push(transaction.serialize());