diff --git a/cloud_functions/package.json b/cloud_functions/package.json index b55dd95b..58b71f06 100644 --- a/cloud_functions/package.json +++ b/cloud_functions/package.json @@ -7,7 +7,7 @@ "scripts": { "build": "tsc", "dev": "ts-node src/index.ts", - "start": "npx functions-framework --target=getSuiEvents [--signature-type=http]", + "start": "npx functions-framework --target=getSolanaEvents [--signature-type=http]", "deploy": "bash scripts/deploy.sh", "gcp-build": "npm i ./dist/src/wormhole-foundation-wormhole-monitor-common-0.0.1.tgz ./dist/src/wormhole-foundation-wormhole-monitor-database-0.0.1.tgz" }, @@ -18,7 +18,6 @@ "@google-cloud/functions-framework": "^3.1.3", "@google-cloud/pubsub": "^3.4.1", "@google-cloud/storage": "^6.8.0", - "@mysten/sui.js": "^0.45.0", "@solana/web3.js": "^1.87.3", "axios": "^1.5.0", "borsh": "^1.0.0", diff --git a/cloud_functions/scripts/deploy.sh b/cloud_functions/scripts/deploy.sh index 0aecac8f..aab28384 100755 --- a/cloud_functions/scripts/deploy.sh +++ b/cloud_functions/scripts/deploy.sh @@ -226,7 +226,6 @@ gcloud functions --project "$GCP_PROJECT" deploy refresh-todays-token-prices --e gcloud functions --project "$GCP_PROJECT" deploy update-token-metadata --entry-point updateTokenMetadata --runtime nodejs18 --trigger-http --no-allow-unauthenticated --timeout 300 --memory 256MB --region europe-west3 --set-env-vars PG_USER=$PG_USER,PG_PASSWORD=$PG_PASSWORD,PG_DATABASE=$PG_DATABASE,PG_HOST=$PG_HOST,PG_TOKEN_METADATA_TABLE=$PG_TOKEN_METADATA_TABLE gcloud functions --project "$GCP_PROJECT" deploy wormchain-monitor --entry-point wormchainMonitor --runtime nodejs18 --trigger-http --no-allow-unauthenticated --timeout 300 --memory 256MB --region europe-west3 --set-env-vars WORMCHAIN_SLACK_CHANNEL_ID=$WORMCHAIN_SLACK_CHANNEL_ID,WORMCHAIN_SLACK_POST_URL=$WORMCHAIN_SLACK_POST_URL,WORMCHAIN_SLACK_BOT_TOKEN=$WORMCHAIN_SLACK_BOT_TOKEN,WORMCHAIN_PAGERDUTY_ROUTING_KEY=$WORMCHAIN_PAGERDUTY_ROUTING_KEY,WORMCHAIN_PAGERDUTY_URL=$WORMCHAIN_PAGERDUTY_URL gcloud functions --project "$GCP_PROJECT" deploy get-solana-events --entry-point getSolanaEvents --runtime nodejs18 --trigger-http --allow-unauthenticated --timeout 300 --memory 256MB --region europe-west3 --set-env-vars SOLANA_RPC=$SOLANA_RPC -gcloud functions --project "$GCP_PROJECT" deploy get-sui-events --entry-point getSuiEvents --runtime nodejs18 --trigger-http --allow-unauthenticated --timeout 300 --memory 256MB --region europe-west3 if [ "$NETWORK" == "MAINNET" ]; then echo "Finished deploying MAINNET functions" diff --git a/cloud_functions/src/getSuiEvents.ts b/cloud_functions/src/getSuiEvents.ts deleted file mode 100644 index 1ea7c63b..00000000 --- a/cloud_functions/src/getSuiEvents.ts +++ /dev/null @@ -1,279 +0,0 @@ -import { ethers } from 'ethers'; -import { - SuiClient, - SuiEvent, - SuiObjectChange, - SuiTransactionBlockResponse, - getFullnodeUrl, - PaginatedTransactionResponse, -} from '@mysten/sui.js/client'; -import { normalizeSuiAddress, SUI_TYPE_ARG } from '@mysten/sui.js/utils'; -import { EventData } from './types'; - -const wormholeMessageEventType = - '0x5306f64e312b581766351c07af79c72fcb1cd25147157fdc2f8ad76de9a3fb6a::publish_message::WormholeMessage'; -const tokenBridgeAddress = '0xc57508ee0d4595e5a8728974a4a93a787d38f339757230d441e895422c07aba9'; -const originalTokenBridgePackageId = - '0x26efee2b51c911237888e5dc6702868abca3c7ac12c53f76ef8eba0697695e3d'; - -export async function getSuiEvents(req: any, res: any) { - res.set('Access-Control-Allow-Origin', '*'); - if (req.method === 'OPTIONS') { - // Send response to OPTIONS requests - res.set('Access-Control-Allow-Methods', 'GET'); - res.set('Access-Control-Allow-Headers', 'Content-Type'); - res.set('Access-Control-Max-Age', '3600'); - res.sendStatus(204); - return; - } - if (!req.query.fromCheckpoint) { - res.status(400).send('fromCheckpoint is required'); - return; - } - if (!req.query.toCheckpoint) { - res.status(400).send('toCheckpoint is required'); - return; - } - try { - const fromCheckpoint = Number(req.query.fromCheckpoint); - const toCheckpoint = Number(req.query.toCheckpoint); - console.log(`fetching events from ${fromCheckpoint} to ${toCheckpoint}`); - const events = await _getSuiEvents(fromCheckpoint, toCheckpoint); - console.log(`fetched ${events.length} events`); - res.json(events); - } catch (e) { - console.error(e); - res.sendStatus(500); - } -} - -/** - * Retrieves Sui events from a given checkpoint range using the token bridge. - * Optimized to make as few RPC calls as possible. - * @param fromCheckpoint The starting checkpoint to retrieve events from. - * @param toCheckpoint The ending checkpoint to retrieve events from. - * @returns An array of EventData objects representing the events that occurred within the given checkpoint range. - */ -const _getSuiEvents = async ( - fromCheckpoint: number, - toCheckpoint: number -): Promise => { - const events: EventData[] = []; - const txBlocks = await getTransactionBlocks(fromCheckpoint, toCheckpoint, tokenBridgeAddress); - for (const txBlock of txBlocks) { - if ( - txBlock.effects?.status.status !== 'success' || - !txBlock.checkpoint || - !txBlock.objectChanges || - txBlock.transaction?.data.transaction.kind !== 'ProgrammableTransaction' - ) { - continue; - } - const transactions = txBlock.transaction.data.transaction.transactions; - for (const tx of transactions) { - const moveCall = 'MoveCall' in tx && tx.MoveCall; - if (!moveCall || moveCall.package !== originalTokenBridgePackageId) { - continue; - } - if ( - (moveCall.module === 'complete_transfer_with_payload' && - moveCall.function === 'authorize_transfer') || - (moveCall.module === 'complete_transfer' && moveCall.function === 'authorize_transfer') - ) { - const token = moveCall.type_arguments![0]; - // search backwards for the parse_and_verify call - const parseAndVerifyTx = transactions - .slice( - 0, - transactions.findIndex((value) => value === tx) - ) - .reverse() - .find( - (tx) => - 'MoveCall' in tx && - tx.MoveCall.module === 'vaa' && - tx.MoveCall.function === 'parse_and_verify' - ); - if (!parseAndVerifyTx || !('MoveCall' in parseAndVerifyTx)) { - continue; - } - const vaaArg = parseAndVerifyTx.MoveCall.arguments?.[1]; - if (!vaaArg || typeof vaaArg !== 'object' || !('Input' in vaaArg)) { - continue; - } - const vaaInput = txBlock.transaction.data.transaction.inputs[vaaArg.Input]; - if (!vaaInput || vaaInput.type !== 'pure' || vaaInput.valueType !== 'vector') { - continue; - } - const vaa = Buffer.from(vaaInput.value as number[]); - const sigStart = 6; - const numSigners = vaa[5]; - const sigLength = 66; - const body = vaa.subarray(sigStart + sigLength * numSigners); - const payload = body.subarray(51); - const type = payload.readUInt8(0); - if (type !== 1 && type !== 3) { - continue; - } - const amount = await denormalizeAmount( - token, - ethers.BigNumber.from(payload.subarray(1, 33)) - ); - const to = `0x${payload.subarray(67, 99).toString('hex')}`; - const event: EventData = { - blockNumber: Number(txBlock.checkpoint), - txHash: txBlock.digest, - // Wrapped tokens are minted from the zero address on Ethereum - // Override the from address to be the zero address for consistency - from: isWrappedToken(token, txBlock.objectChanges) - ? ethers.constants.AddressZero - : tokenBridgeAddress, - to, - token, - amount: amount.toString(), - isDeposit: false, - }; - events.push(event); - } - if ( - ((moveCall.module === 'transfer_tokens_with_payload' && - moveCall.function === 'transfer_tokens_with_payload') || - (moveCall.module === 'transfer_tokens' && moveCall.function === 'transfer_tokens')) && - txBlock.events - ) { - const token = tx.MoveCall.type_arguments![0]; - const payload = getWormholeMessagePayload(txBlock.events); - const originChain = payload.readUint16BE(65); - const toChain = payload.readUInt16BE(99); - const amount = await denormalizeAmount( - token, - ethers.BigNumber.from(payload.subarray(1, 33)) - ); - const isWrapped = isWrappedToken(token, txBlock.objectChanges); - const event: EventData = { - blockNumber: Number(txBlock.checkpoint), - txHash: txBlock.digest, - from: txBlock.transaction.data.sender, - // if this is a wrapped token being burned and not being sent to its origin chain, - // then it should be included in the volume by fixing the to address - to: - !isWrapped || originChain !== toChain - ? tokenBridgeAddress - : ethers.constants.AddressZero, - token, - amount: amount.toString(), - isDeposit: !isWrapped, - }; - events.push(event); - } - } - } - return events; -}; - -const getWormholeMessagePayload = (events: SuiEvent[]): Buffer => { - const filtered = events.filter((event) => { - return event.type === wormholeMessageEventType; - }); - // TODO: support multiple transfers in a single txBlock - if (filtered.length !== 1) { - throw new Error(`Expected exactly one wormhole message event, found ${filtered.length}`); - } - return Buffer.from((filtered[0].parsedJson as any).payload); -}; - -const tokenDecimalsCache: { [token: string]: number } = {}; - -const getTokenDecimals = async (token: string): Promise => { - if (token in tokenDecimalsCache) { - return tokenDecimalsCache[token]; - } - const client = getClient(); - const coinMetadata = await client.getCoinMetadata({ coinType: token }); - if (coinMetadata === null) { - throw new Error(`Failed to get coin metadata for ${token}`); - } - const { decimals } = coinMetadata; - tokenDecimalsCache[token] = decimals; - return decimals; -}; - -const denormalizeAmount = async ( - token: string, - amount: ethers.BigNumber -): Promise => { - const decimals = await getTokenDecimals(token); - if (decimals > 8) { - return amount.mul(ethers.BigNumber.from(10).pow(decimals - 8)); - } - return amount; -}; - -const isWrappedToken = (token: string, objectChanges: SuiObjectChange[]) => { - const split = token.split('::'); - if (split.length !== 3) { - throw new Error(`Invalid token ${token}`); - } - const normalized = - token === SUI_TYPE_ARG ? token : `${normalizeSuiAddress(split[0])}::${split[1]}::${split[2]}`; - const nativeKey = `0x2::dynamic_field::Field<${originalTokenBridgePackageId}::token_registry::Key<${normalized}>, ${originalTokenBridgePackageId}::native_asset::NativeAsset<${normalized}>>`; - const wrappedKey = `0x2::dynamic_field::Field<${originalTokenBridgePackageId}::token_registry::Key<${normalized}>, ${originalTokenBridgePackageId}::wrapped_asset::WrappedAsset<${normalized}>>`; - const value = objectChanges.find( - (change) => change.type === 'mutated' && [nativeKey, wrappedKey].includes(change.objectType) - ); - if (!value) { - throw new Error(`Failed to find object change for token ${normalized}`); - } - return value.type === 'mutated' && value.objectType === wrappedKey; -}; - -export const getTransactionBlocks = async ( - fromCheckpoint: number, - toCheckpoint: number, - changedObject: string -): Promise => { - const client = getClient(); - const results: SuiTransactionBlockResponse[] = []; - let hasNextPage = false; - let cursor: string | null | undefined = undefined; - let oldestCheckpoint: string | null = null; - do { - // TODO: The public RPC doesn't support fetching events by chaining filters with a `TimeRange` filter, - // so we have to search backwards for our checkpoint range - const response: PaginatedTransactionResponse = await client.queryTransactionBlocks({ - filter: { ChangedObject: changedObject }, - cursor, - options: { - showEffects: true, - showEvents: true, - showInput: true, - showObjectChanges: true, - }, - }); - for (const txBlock of response.data) { - const checkpoint = txBlock.checkpoint; - if (!checkpoint) { - continue; - } - if (checkpoint >= fromCheckpoint.toString() && checkpoint <= toCheckpoint.toString()) { - results.push(txBlock); - } - if (oldestCheckpoint === null || checkpoint < oldestCheckpoint) { - oldestCheckpoint = checkpoint; - } - } - hasNextPage = response.hasNextPage; - cursor = response.nextCursor; - } while ( - hasNextPage && - cursor && - oldestCheckpoint && - oldestCheckpoint >= fromCheckpoint.toString() - ); - return results; -}; - -const getClient = () => { - const url = process.env.SUI_RPC ?? getFullnodeUrl('mainnet'); - return new SuiClient({ url }); -}; diff --git a/cloud_functions/src/index.ts b/cloud_functions/src/index.ts index f0d5dd72..e42b7565 100644 --- a/cloud_functions/src/index.ts +++ b/cloud_functions/src/index.ts @@ -25,7 +25,6 @@ export const { getReobserveVaas } = require('./getReobserveVaas'); export const { wormchainMonitor } = require('./wormchainMonitor'); export const { getLatestTokenData } = require('./getLatestTokenData'); export const { getSolanaEvents } = require('./getSolanaEvents'); -export const { getSuiEvents } = require('./getSuiEvents'); // Register an HTTP function with the Functions Framework that will be executed // when you make an HTTP request to the deployed function's endpoint. @@ -52,4 +51,3 @@ functions.http('getReobserveVaas', getReobserveVaas); functions.http('wormchainMonitor', wormchainMonitor); functions.http('latestTokenData', getLatestTokenData); functions.http('getSolanaEvents', getSolanaEvents); -functions.http('getSuiEvents', getSuiEvents); diff --git a/package-lock.json b/package-lock.json index a1e5fc95..86021fdc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -32,7 +32,6 @@ "@google-cloud/functions-framework": "^3.1.3", "@google-cloud/pubsub": "^3.4.1", "@google-cloud/storage": "^6.8.0", - "@mysten/sui.js": "^0.45.0", "@solana/web3.js": "^1.87.3", "axios": "^1.5.0", "borsh": "^1.0.0", @@ -198,34 +197,6 @@ "resolved": "https://registry.npmjs.org/@cosmjs/utils/-/utils-0.31.1.tgz", "integrity": "sha512-n4Se1wu4GnKwztQHNFfJvUeWcpvx3o8cWhSbNs9JQShEuB3nv3R5lqFBtDCgHZF/emFQAP+ZjF8bTfCs9UBGhA==" }, - "cloud_functions/node_modules/@mysten/bcs": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@mysten/bcs/-/bcs-0.8.1.tgz", - "integrity": "sha512-wSEdP7QEfGQdb34g+7R0f3OdRqrv88iIABfJVDVJ6IsGLYVILreh8dZfNpZNUUyzctiyhX7zB9e/lR5qkddFPA==", - "dependencies": { - "bs58": "^5.0.0" - } - }, - "cloud_functions/node_modules/@mysten/sui.js": { - "version": "0.45.0", - "resolved": "https://registry.npmjs.org/@mysten/sui.js/-/sui.js-0.45.0.tgz", - "integrity": "sha512-t+LyGWzKTH+TM3c7apvK2aohnx6hj0nxjqrqbk49X/uLxhvDKEIoTGJDQC2cfDTOg6OteYTefCNsfRauh8wAzA==", - "dependencies": { - "@mysten/bcs": "0.8.1", - "@noble/curves": "^1.1.0", - "@noble/hashes": "^1.3.1", - "@open-rpc/client-js": "^1.8.1", - "@scure/bip32": "^1.3.1", - "@scure/bip39": "^1.2.1", - "@suchipi/femver": "^1.0.0", - "events": "^3.3.0", - "superstruct": "^1.0.3", - "tweetnacl": "^1.0.3" - }, - "engines": { - "node": ">=16" - } - }, "cloud_functions/node_modules/@noble/hashes": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz", @@ -237,18 +208,6 @@ "url": "https://paulmillr.com/funding/" } }, - "cloud_functions/node_modules/@scure/bip39": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.1.tgz", - "integrity": "sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg==", - "dependencies": { - "@noble/hashes": "~1.3.0", - "@scure/base": "~1.1.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, "cloud_functions/node_modules/axios": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/axios/-/axios-1.5.0.tgz", @@ -259,11 +218,6 @@ "proxy-from-env": "^1.1.0" } }, - "cloud_functions/node_modules/base-x": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/base-x/-/base-x-4.0.0.tgz", - "integrity": "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw==" - }, "cloud_functions/node_modules/bech32": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", @@ -274,14 +228,6 @@ "resolved": "https://registry.npmjs.org/borsh/-/borsh-1.0.0.tgz", "integrity": "sha512-fSVWzzemnyfF89EPwlUNsrS5swF5CrtiN4e+h0/lLf4dz2he4L3ndM20PS9wj7ICSkXJe/TQUHdaPTq15b1mNQ==" }, - "cloud_functions/node_modules/bs58": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz", - "integrity": "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==", - "dependencies": { - "base-x": "^4.0.0" - } - }, "cloud_functions/node_modules/cosmjs-types": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/cosmjs-types/-/cosmjs-types-0.8.0.tgz", @@ -316,14 +262,6 @@ "pbts": "bin/pbts" } }, - "cloud_functions/node_modules/superstruct": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/superstruct/-/superstruct-1.0.3.tgz", - "integrity": "sha512-8iTn3oSS8nRGn+C2pgXSKPI3jmpm6FExNazNpjvqS6ZUJQCej3PUXEKM8NjHBOs54ExM+LPW/FBRhymrdcCiSg==", - "engines": { - "node": ">=14.0.0" - } - }, "cloud_functions/node_modules/typescript": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", @@ -6521,25 +6459,6 @@ "node": ">= 8" } }, - "node_modules/@open-rpc/client-js": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/@open-rpc/client-js/-/client-js-1.8.1.tgz", - "integrity": "sha512-vV+Hetl688nY/oWI9IFY0iKDrWuLdYhf7OIKI6U1DcnJV7r4gAgwRJjEr1QVYszUc0gjkHoQJzqevmXMGLyA0g==", - "dependencies": { - "isomorphic-fetch": "^3.0.0", - "isomorphic-ws": "^5.0.0", - "strict-event-emitter-types": "^2.0.0", - "ws": "^7.0.0" - } - }, - "node_modules/@open-rpc/client-js/node_modules/isomorphic-ws": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-5.0.0.tgz", - "integrity": "sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw==", - "peerDependencies": { - "ws": "*" - } - }, "node_modules/@opentelemetry/api": { "version": "1.4.1", "license": "Apache-2.0", @@ -15057,15 +14976,6 @@ "version": "2.0.0", "license": "ISC" }, - "node_modules/isomorphic-fetch": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-3.0.0.tgz", - "integrity": "sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA==", - "dependencies": { - "node-fetch": "^2.6.1", - "whatwg-fetch": "^3.4.1" - } - }, "node_modules/isomorphic-ws": { "version": "4.0.1", "license": "MIT", @@ -23734,11 +23644,6 @@ "version": "1.0.1", "license": "MIT" }, - "node_modules/strict-event-emitter-types": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strict-event-emitter-types/-/strict-event-emitter-types-2.0.0.tgz", - "integrity": "sha512-Nk/brWYpD85WlOgzw5h173aci0Teyv8YdIAEtV+N88nDB0dLlazZyJMIsN6eo1/AR61l+p6CJTG1JIyFaoNEEA==" - }, "node_modules/strict-uri-encode": { "version": "1.1.0", "license": "MIT", @@ -31894,25 +31799,6 @@ "fastq": "^1.6.0" } }, - "@open-rpc/client-js": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/@open-rpc/client-js/-/client-js-1.8.1.tgz", - "integrity": "sha512-vV+Hetl688nY/oWI9IFY0iKDrWuLdYhf7OIKI6U1DcnJV7r4gAgwRJjEr1QVYszUc0gjkHoQJzqevmXMGLyA0g==", - "requires": { - "isomorphic-fetch": "^3.0.0", - "isomorphic-ws": "^5.0.0", - "strict-event-emitter-types": "^2.0.0", - "ws": "^7.0.0" - }, - "dependencies": { - "isomorphic-ws": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-5.0.0.tgz", - "integrity": "sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw==", - "requires": {} - } - } - }, "@opentelemetry/api": { "version": "1.4.1" }, @@ -33262,7 +33148,6 @@ "@google-cloud/functions-framework": "^3.1.3", "@google-cloud/pubsub": "^3.4.1", "@google-cloud/storage": "^6.8.0", - "@mysten/sui.js": "^0.45.0", "@solana/web3.js": "^1.87.3", "axios": "^1.5.0", "borsh": "^1.0.0", @@ -33428,45 +33313,11 @@ "resolved": "https://registry.npmjs.org/@cosmjs/utils/-/utils-0.31.1.tgz", "integrity": "sha512-n4Se1wu4GnKwztQHNFfJvUeWcpvx3o8cWhSbNs9JQShEuB3nv3R5lqFBtDCgHZF/emFQAP+ZjF8bTfCs9UBGhA==" }, - "@mysten/bcs": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@mysten/bcs/-/bcs-0.8.1.tgz", - "integrity": "sha512-wSEdP7QEfGQdb34g+7R0f3OdRqrv88iIABfJVDVJ6IsGLYVILreh8dZfNpZNUUyzctiyhX7zB9e/lR5qkddFPA==", - "requires": { - "bs58": "^5.0.0" - } - }, - "@mysten/sui.js": { - "version": "0.45.0", - "resolved": "https://registry.npmjs.org/@mysten/sui.js/-/sui.js-0.45.0.tgz", - "integrity": "sha512-t+LyGWzKTH+TM3c7apvK2aohnx6hj0nxjqrqbk49X/uLxhvDKEIoTGJDQC2cfDTOg6OteYTefCNsfRauh8wAzA==", - "requires": { - "@mysten/bcs": "0.8.1", - "@noble/curves": "^1.1.0", - "@noble/hashes": "^1.3.1", - "@open-rpc/client-js": "^1.8.1", - "@scure/bip32": "^1.3.1", - "@scure/bip39": "^1.2.1", - "@suchipi/femver": "^1.0.0", - "events": "^3.3.0", - "superstruct": "^1.0.3", - "tweetnacl": "^1.0.3" - } - }, "@noble/hashes": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz", "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==" }, - "@scure/bip39": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.1.tgz", - "integrity": "sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg==", - "requires": { - "@noble/hashes": "~1.3.0", - "@scure/base": "~1.1.0" - } - }, "axios": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/axios/-/axios-1.5.0.tgz", @@ -33477,11 +33328,6 @@ "proxy-from-env": "^1.1.0" } }, - "base-x": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/base-x/-/base-x-4.0.0.tgz", - "integrity": "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw==" - }, "bech32": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", @@ -33492,14 +33338,6 @@ "resolved": "https://registry.npmjs.org/borsh/-/borsh-1.0.0.tgz", "integrity": "sha512-fSVWzzemnyfF89EPwlUNsrS5swF5CrtiN4e+h0/lLf4dz2he4L3ndM20PS9wj7ICSkXJe/TQUHdaPTq15b1mNQ==" }, - "bs58": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz", - "integrity": "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==", - "requires": { - "base-x": "^4.0.0" - } - }, "cosmjs-types": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/cosmjs-types/-/cosmjs-types-0.8.0.tgz", @@ -33529,11 +33367,6 @@ "long": "^4.0.0" } }, - "superstruct": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/superstruct/-/superstruct-1.0.3.tgz", - "integrity": "sha512-8iTn3oSS8nRGn+C2pgXSKPI3jmpm6FExNazNpjvqS6ZUJQCej3PUXEKM8NjHBOs54ExM+LPW/FBRhymrdcCiSg==" - }, "typescript": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", @@ -38880,15 +38713,6 @@ "isexe": { "version": "2.0.0" }, - "isomorphic-fetch": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-3.0.0.tgz", - "integrity": "sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA==", - "requires": { - "node-fetch": "^2.6.1", - "whatwg-fetch": "^3.4.1" - } - }, "isomorphic-ws": { "version": "4.0.1", "requires": {} @@ -44184,11 +44008,6 @@ "stream-shift": { "version": "1.0.1" }, - "strict-event-emitter-types": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strict-event-emitter-types/-/strict-event-emitter-types-2.0.0.tgz", - "integrity": "sha512-Nk/brWYpD85WlOgzw5h173aci0Teyv8YdIAEtV+N88nDB0dLlazZyJMIsN6eo1/AR61l+p6CJTG1JIyFaoNEEA==" - }, "strict-uri-encode": { "version": "1.1.0" },